gravityScale

    Multiplies the gravity applied to the body. The body’s gravity is calculated from the Default Gravity value in Project > Project Settings > Physics > 2d and/or any additional gravity vector applied by Area2Ds.

    RigidBody2D.swift:129
    final var gravityScale: Double { get set }

    Other members in extension

    Types

    Type members

    Instance members

    Show implementation details (1)

    Hide implementation details

    • func _integrateForces(state: PhysicsDirectBodyState2D?)

      Allows you to read and safely modify the simulation state for the object. Use this instead of _physicsProcess(delta:) if you need to directly change the body’s position or other physics properties. By default, it works in addition to the usual physics behavior, but customIntegrator allows you to disable the default behavior and write custom force integration for a body.