smoothness
TypeScriptget smoothness(): numberSwift declarationlet smoothness: FloatA 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.
struct · iOS 18.0+ · SDK 27.1
struct TurbulenceForceEffectA force effect that applies random forces with magnitudes proportional to each body's velocity.
get smoothness(): numberSwift declarationlet smoothness: FloatA 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 parameterTypes(): PhysicsBodyParameterTypesSwift declarationvar parameterTypes: PhysicsBodyParameterTypes { get }The input rigid body parameters.
get speed(): numberSwift declarationlet speed: FloatThe effect’s variation over time. Specify `0.0` for a static force field.
update(parameters: ForceEffectParameters): { $ret: null; $out: { "parameters": ForceEffectParameters } }Swift declarationfunc 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.
static init(strength: number, smoothness: number, speed: number): TurbulenceForceEffectSwift declarationinit(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 strength(): numberSwift declarationlet strength: FloatThe magnitude of the force.
get forceMode(): ForceModeSwift declarationvar forceMode: ForceModeThe type of force this effect applies.
set forceMode(value: ForceMode)Swift declarationvar forceMode: ForceModeThe type of force this effect applies.
No declarations were skipped in this snapshot.