pub struct ConstantForce2D {
pub m_Enabled: u8,
pub m_Force: Vector2f,
pub m_GameObject: PPtr,
pub m_RelativeForce: Vector2f,
pub m_Torque: f32,
}
Expand description
ConstantForce2D is a class of the Unity engine since version 5.0.0f4. Exert from Unity’s scripting documentation: Applies both linear and angular (torque) forces continuously to the rigidbody each physics update. This is equivalent of calling Rigidbody2D.AddForce, Rigidbody2D.AddRelativeForce and Rigidbody2D.AddTorque each physics update.
See Also: Rigidbody2D.
Fields§
§m_Enabled: u8
Enabled Behaviours are Updated, disabled Behaviours are not.
m_Force: Vector2f
The linear force applied to the rigidbody each physics update.
m_GameObject: PPtr
The game object this component is attached to. A component is always attached to a game object.
PPtr<GameObject
>: (5.0.0f4 - 2022.3.2f1)
m_RelativeForce: Vector2f
The linear force, relative to the rigid-body coordinate system, applied each physics update.
m_Torque: f32
The torque applied to the rigidbody each physics update.