TrueSync
Public Types | Public Member Functions | Public Attributes | Properties | List of all members
TrueSync.TSRigidBody Class Reference

Represents a physical 3D rigid body. More...

Inheritance diagram for TrueSync.TSRigidBody:

Public Types

enum  InterpolateMode { None, Interpolate, Extrapolate }
 

Public Member Functions

void AddForce (TSVector force)
 Applies the provided force in the body. More...
 
void AddForce (TSVector force, ForceMode mode)
 Applies the provided force in the body. More...
 
void AddForce (TSVector force, TSVector position)
 Applies the provided force in the body. More...
 
void AddForce (TSVector force, TSVector position, ForceMode mode)
 Applies the provided force in the body. More...
 
void AddTorque (TSVector torque)
 Simulates the provided tourque in the body. More...
 
void LookAt (TSVector target)
 Changes orientation to look at target position. More...
 
void MovePosition (TSVector position)
 Moves the body to a new position.
 
void MoveRotation (TSQuaternion 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.
 
TSCollider tsCollider [get]
 Returns the TSCollider attached.
 
TSTransform tsTransform [get]
 Returns the TSTransform attached.
 
TSVector position [get, set]
 Position of the body.
 
TSQuaternion rotation [get, set]
 Orientation of the body.
 
TSVector velocity [get, set]
 LinearVelocity of the body.
 
TSVector angularVelocity [get, set]
 AngularVelocity of the body.
 

Detailed Description

Represents a physical 3D rigid body.

Definition at line 11 of file TSRigidBody.cs.

Member Function Documentation

void TrueSync.TSRigidBody.AddForce ( TSVector  force)

Applies the provided force in the body.

Parameters
forceA TSVector representing the force to be applied.

Definition at line 134 of file TSRigidBody.cs.

void TrueSync.TSRigidBody.AddForce ( TSVector  force,
ForceMode  mode 
)

Applies the provided force in the body.

Parameters
forceA TSVector representing the force to be applied.
modeIndicates how the force should be applied.

Definition at line 144 of file TSRigidBody.cs.

void TrueSync.TSRigidBody.AddForce ( TSVector  force,
TSVector  position 
)

Applies the provided force in the body.

Parameters
forceA TSVector representing the force to be applied.
positionIndicates the location where the force should hit.

Definition at line 158 of file TSRigidBody.cs.

void TrueSync.TSRigidBody.AddForce ( TSVector  force,
TSVector  position,
ForceMode  mode 
)

Applies the provided force in the body.

Parameters
forceA TSVector representing the force to be applied.
positionIndicates the location where the force should hit.

Definition at line 168 of file TSRigidBody.cs.

void TrueSync.TSRigidBody.AddTorque ( TSVector  torque)

Simulates the provided tourque in the body.

Parameters
torqueA TSVector representing the torque to be applied.

Definition at line 181 of file TSRigidBody.cs.

void TrueSync.TSRigidBody.LookAt ( TSVector  target)

Changes orientation to look at target position.

Parameters
targetA TSVector representing the position to look at.

Definition at line 191 of file TSRigidBody.cs.


The documentation for this class was generated from the following file: