Represents a physical 2D rigid body.
More...
|
enum | InterpolateMode { None,
Interpolate,
Extrapolate
} |
|
|
InterpolateMode | interpolation |
| Interpolation mode that should be used.
|
|
bool | freezeZAxis |
| If true it freezes Z rotation of the RigidBody (it only appears when in 2D Physics).
|
|
|
FP | mass [get, set] |
| Mass of the body.
|
|
bool | useGravity [get, set] |
| If true it uses gravity force.
|
|
bool | isKinematic [get, set] |
| If true it doesn't get influences from external forces.
|
|
TSCollider2D | tsCollider [get] |
|
TSVector2 | position [get, set] |
| Position of the body.
|
|
FP | rotation [get, set] |
| Orientation of the body.
|
|
TSVector2 | velocity [get, set] |
| LinearVelocity of the body.
|
|
FP | angularVelocity [get, set] |
| AngularVelocity of the body (radians/s).
|
|
Represents a physical 2D rigid body.
Definition at line 10 of file TSRigidBody2D.cs.
void TrueSync.TSRigidBody2D.AddForce |
( |
TSVector2 |
force | ) |
|
Applies the provided force in the body.
- Parameters
-
force | A TSVector2 representing the force to be applied. |
Definition at line 126 of file TSRigidBody2D.cs.
void TrueSync.TSRigidBody2D.AddForce |
( |
TSVector2 |
force, |
|
|
ForceMode |
mode |
|
) |
| |
Applies the provided force in the body.
- Parameters
-
force | A TSVector2 representing the force to be applied. |
mode | Indicates how the force should be applied. |
Definition at line 136 of file TSRigidBody2D.cs.
void TrueSync.TSRigidBody2D.AddForce |
( |
TSVector2 |
force, |
|
|
TSVector2 |
position |
|
) |
| |
Applies the provided force in the body.
- Parameters
-
force | A TSVector2 representing the force to be applied. |
position | Indicates the location where the force should hit. |
Definition at line 150 of file TSRigidBody2D.cs.
void TrueSync.TSRigidBody2D.AddForce |
( |
TSVector2 |
force, |
|
|
TSVector2 |
position, |
|
|
ForceMode |
mode |
|
) |
| |
Applies the provided force in the body.
- Parameters
-
force | A TSVector2 representing the force to be applied. |
position | Indicates the location where the force should hit. |
Definition at line 160 of file TSRigidBody2D.cs.
void TrueSync.TSRigidBody2D.AddTorque |
( |
TSVector2 |
torque | ) |
|
Simulates the provided tourque in the body.
- Parameters
-
torque | A TSVector2 representing the torque to be applied. |
Definition at line 173 of file TSRigidBody2D.cs.
The documentation for this class was generated from the following file: