SKPhysicsWorld.Gravity Property

Definition

A vector representing gravitational acceleration.

[get: Foundation.Export("gravity")]
[set: Foundation.Export("setGravity:")]
public virtual CoreGraphics.CGVector Gravity { get; set; }
member this.Gravity : CoreGraphics.CGVector with get, set

Property Value

The default value of (0, -9.8) mimics Earth standard gravity of 9.78 m/sec^2. Setting the value to (0,0) effectively turns off gravity.

Attributes

Applies to

See also

  • <xref:SpriteKite.SKPhysicsBody.AffectedByGravity>