Legacy Documentation: Version 5.6 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

ConstantForce2D.relativeForce

Switch to Manual
public Vector2 relativeForce;

Description

The linear force, relative to the rigid-body coordinate system, applied each physics update.

The force is specified in the local rigid-body coordinate frame i.e. dependent on the rigid-body rotation and is applied to the center-of-mass therefore no torque is generated.