One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

TimedForceFalloff

struct · iOS 18.0+ · SDK 27.1

struct TimedForceFalloff

A type that modulates the force strength based on how long the force effect has run. Forces have the largest strength when the force effect starts to play and gradually decay to zero when approaching the given duration. The effect also stops playing when reaching the duration. Similar to ``SpatialForceFalloff``, ``TimedForceFalloff/rate`` controls how fast the force strength decays. You can set the rate to zero to have a force effect with no temporal falloff. ```swift let noTimedFalloff = TimedFalloff(duration: 1, rate: 0) ```

Members (5)

get · iOS 18.0+

rate

TypeScript
get rate(): number
Swift declaration
var rate: Double

The temporal falloff / attenuation rate. An exponent that determines how the effect's strength diminishes over time. Use a non-negative rate. * When the rate is **0**, no falloff occurs. * When the rate is **greater than 0 and less than 1.0**, falloff occurs slower and is sublinear. * When the rate is **1.0**, falloff is linear. * When the rate is **greater than 1**, falloff occurs faster and is nonlinear.

set · iOS 18.0+

rate

TypeScript
set rate(value: number)
Swift declaration
var rate: Double

The temporal falloff / attenuation rate. An exponent that determines how the effect's strength diminishes over time. Use a non-negative rate. * When the rate is **0**, no falloff occurs. * When the rate is **greater than 0 and less than 1.0**, falloff occurs slower and is sublinear. * When the rate is **1.0**, falloff is linear. * When the rate is **greater than 1**, falloff occurs faster and is nonlinear.

init · iOS 18.0+

init

TypeScript
static init(duration: number, rate?: number): TimedForceFalloff
Swift declaration
init(duration: TimeInterval, rate: Double = 1.0)

Creates a timed force falloff. - Parameters: - duration: The lifetime of the effect in seconds. - rate: Controls how fast or slow falloff occurs. * When the rate is **0**, no falloff occurs. (Rigid bodies outside the bounds are culled.) * When the rate is **greater than 0 and less than 1.0**, falloff occurs slower and is sublinear. * When the rate is **1.0**, falloff is linear. * When the rate is **greater than 1**, falloff occurs faster and is nonlinear.

get · iOS 18.0+

duration

TypeScript
get duration(): number
Swift declaration
var duration: TimeInterval

The lifetime of the effect in seconds. This value needs to be non-negative.

set · iOS 18.0+

duration

TypeScript
set duration(value: number)
Swift declaration
var duration: TimeInterval

The lifetime of the effect in seconds. This value needs to be non-negative.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →