TrueSync
Public Member Functions | Properties | List of all members
TrueSync.PhysicsWorldManager Class Reference

Manages the 3D physics simulation. More...

Inheritance diagram for TrueSync.PhysicsWorldManager:

Public Member Functions

void Init ()
 
void UpdateStep ()
 Goes one step further on the physics simulation.
 
IWorld GetWorld ()
 Instance of the current simulated world.
 
void AddBody (ICollider iCollider)
 Add a new RigidBody to the world. More...
 
void RemoveBody (IBody iBody)
 
void OnRemoveBody (System.Action< IBody > OnRemoveBody)
 
bool Raycast (TSVector rayOrigin, TSVector rayDirection, RaycastCallback raycast, out IBody body, out TSVector normal, out FP fraction)
 
TSRaycastHit Raycast (TSRay ray, FP maxDistance, RaycastCallback callback=null)
 
GameObject GetGameObject (IBody rigidBody)
 Get the GameObject related to a specific RigidBody. More...
 
bool IsCollisionEnabled (IBody rigidBody1, IBody rigidBody2)
 Check if the collision between two RigidBodies is enabled. More...
 
IWorldClone GetWorldClone ()
 

Properties

TSVector Gravity [get, set]
 Property access to simulated gravity.
 
bool SpeculativeContacts [get, set]
 Property access to speculative contacts.
 
FP LockedTimeStep [get, set]
 

Detailed Description

Manages the 3D physics simulation.

Definition at line 10 of file PhysicsWorldManager.cs.

Member Function Documentation

void TrueSync.PhysicsWorldManager.AddBody ( ICollider  iCollider)

Add a new RigidBody to the world.

Parameters
jRigidBodyInstance of a TSRigidBody.

Definition at line 97 of file PhysicsWorldManager.cs.

GameObject TrueSync.PhysicsWorldManager.GetGameObject ( IBody  rigidBody)

Get the GameObject related to a specific RigidBody.

Parameters
rigidBodyInstance of a RigidBody

Definition at line 244 of file PhysicsWorldManager.cs.

bool TrueSync.PhysicsWorldManager.IsCollisionEnabled ( IBody  rigidBody1,
IBody  rigidBody2 
)

Check if the collision between two RigidBodies is enabled.

Parameters
rigidBody1First RigidBody
rigidBody2Second RigidBody

Definition at line 254 of file PhysicsWorldManager.cs.


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