編集

次の方法で共有


SKPhysicsWorld.Gravity Property

Definition

A vector representing gravitational acceleration.

public virtual CoreGraphics.CGVector Gravity { [Foundation.Export("gravity")] get; [Foundation.Export("setGravity:")] 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>