TrueSync
Public Types | Public Member Functions | Public Attributes | Properties | List of all members
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 AddForce (TSVector2 force, TSVector2 position)
 Applies the provided force in the body. More...
 
void AddForce (TSVector2 force, TSVector2 position, ForceMode mode)
 Applies the provided force in the body. More...
 
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.
 
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
forceA 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
forceA TSVector2 representing the force to be applied.
modeIndicates 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
forceA TSVector2 representing the force to be applied.
positionIndicates 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
forceA TSVector2 representing the force to be applied.
positionIndicates 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
torqueA 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: