TrueSync
|
TrueSync.TSRigidBody2D Class Reference
Represents a physical 2D rigid body. More...
Inheritance diagram for TrueSync.TSRigidBody2D:

Public Types | |
enum | InterpolateMode { None, Interpolate, Extrapolate } |
Public Member Functions | |
void | AddForce (TSVector2 force) |
Applies the provided force in the body. More... | |
void | AddForce (TSVector2 force, ForceMode mode) |
Applies the provided force in the body. More... | |
void | AddForceAtPosition (TSVector2 force, TSVector2 position) |
Applies the provided force in the body. More... | |
void | AddForceAtPosition (TSVector2 force, TSVector2 position, ForceMode mode) |
Applies the provided force in the body. More... | |
TSVector2 | GetPointVelocity (TSVector2 worldPoint) |
Returns the velocity of the body at some position in world space. | |
void | AddTorque (TSVector2 torque) |
Simulates the provided tourque in the body. More... | |
void | MovePosition (TSVector2 position) |
Moves the body to a new position. | |
void | MoveRotation (FP rot) |
Rotates the body to a provided rotation. | |
Public Attributes | |
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). | |
Properties | |
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. | |
FP | drag [get, set] |
Linear drag coeficient. | |
FP | angularDrag [get, set] |
Angular drag coeficient. | |
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). | |
Detailed Description
Represents a physical 2D rigid body.
Definition at line 10 of file TSRigidBody2D.cs.
Member Function Documentation
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 174 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 184 of file TSRigidBody2D.cs.
void TrueSync.TSRigidBody2D.AddForceAtPosition | ( | 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 198 of file TSRigidBody2D.cs.
void TrueSync.TSRigidBody2D.AddForceAtPosition | ( | 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 208 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 229 of file TSRigidBody2D.cs.
The documentation for this class was generated from the following file:
Generated by
