One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

TurbulenceForceEffect

struct · iOS 18.0+ · SDK 27.1

struct TurbulenceForceEffect

A force effect that applies random forces with magnitudes proportional to each body's velocity.

Members (8)

get · iOS 18.0+

smoothness

TypeScript
get smoothness(): number
Swift declaration
let smoothness: Float

A smoothing factor that applies to the force, reducing randomness. A value of `0.0` specifies maximum noise, and a value of `1.0` specifies no noise at all.

get · iOS 18.0+

parameterTypes

TypeScript
get parameterTypes(): PhysicsBodyParameterTypes
Swift declaration
var parameterTypes: PhysicsBodyParameterTypes { get }

The input rigid body parameters.

get · iOS 18.0+

speed

TypeScript
get speed(): number
Swift declaration
let speed: Float

The effect’s variation over time. Specify `0.0` for a static force field.

method · iOS 18.0+

update

TypeScript
update(parameters: ForceEffectParameters): { $ret: null; $out: { "parameters": ForceEffectParameters } }
Swift declaration
func update(parameters: inout ForceEffectParameters)

Calculates the turbulence forces for rigid bodies from the force effect. - Parameter parameters: On input, the parameters that calculate forces to the affected physics bodies; on output, the updates to those forces. The framework automatically calls this method for you at each physics simulation step, so you don't need to call it yourself.

Omit the output parameters from the call. The result contains $ret and $out, with parameters inside $out.

init · iOS 18.0+

init

TypeScript
static init(strength: number, smoothness: number, speed: number): TurbulenceForceEffect
Swift declaration
init(strength: Double, smoothness: Double, speed: Double)

Creates a turbulence force effect. - Parameters: - strength: The magnitude of the force. - smoothness: The amount of randomness used in the turbulence effect.

get · iOS 18.0+

strength

TypeScript
get strength(): number
Swift declaration
let strength: Float

The magnitude of the force.

get · iOS 18.0+

forceMode

TypeScript
get forceMode(): ForceMode
Swift declaration
var forceMode: ForceMode

The type of force this effect applies.

set · iOS 18.0+

forceMode

TypeScript
set forceMode(value: ForceMode)
Swift declaration
var forceMode: ForceMode

The type of force this effect applies.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →