BodyParameter

    PhysicsServer2D.swift:200
    enum BodyParameter

    Cases

    • case bounce

      Constant to set/get a body’s bounce factor. The default value of this parameter is 0.0.

    • case friction

      Constant to set/get a body’s friction. The default value of this parameter is 1.0.

    • case mass

      Constant to set/get a body’s mass. The default value of this parameter is 1.0. If the body’s mode is set to .rigid, then setting this parameter will have the following additional effects:

    • case inertia

      Constant to set/get a body’s inertia. The default value of this parameter is 0.0. If the body’s inertia is set to a value <= 0.0, then the inertia will be recalculated based on the body’s shapes, mass, and center of mass.

    • case centerOfMass

      Constant to set/get a body’s center of mass position in the body’s local coordinate system. The default value of this parameter is Vector2(0,0). If this parameter is never set explicitly, then it is recalculated based on the body’s shapes when setting the parameter .bodyParamMass or when calling bodySetSpace(body:space:).

    • case gravityScale

      Constant to set/get a body’s gravity multiplier. The default value of this parameter is 1.0.

    • case linearDampMode

      Constant to set/get a body’s linear damping mode. See BodyDampMode for possible values. The default value of this parameter is .combine.

    • case angularDampMode

      Constant to set/get a body’s angular damping mode. See BodyDampMode for possible values. The default value of this parameter is .combine.

    • case linearDamp

      Constant to set/get a body’s linear damping factor. The default value of this parameter is 0.0.

    • case angularDamp

      Constant to set/get a body’s angular damping factor. The default value of this parameter is 0.0.

    • case max

      Represents the size of the BodyParameter enum.

    Other members in extension

    View members

    Hide members

    This section is hidden by default because it contains too many (135) members.

    Types

    Type members

    Citizens in SwiftGodot

    Conformances

    Type members

    Instance members

    Type features

    Instance features