Game Engine - Physics subsystem
A simple start. |
|
The physics subsystem can be controlled from Onyx using a collection of physics engine functions (hooks back to the game engine).
These functions are defined in the game engine, and can be called from an Onyx script:
- void RigidBodyAddGravity(handle hRigidBody) - adds a standard gravity force to the rigid body
- void RigidBodyAddWorldForce(handle hRigidBody,Vector3 force) - add a world force to the CG
- void RigidBodyAddWorldForceAtPos(handle hRigidBody,Vector3 force,Vector3 pos) - add a world force at body pos
- void RigidBodyAddBodyForceAtPos(handle hRigidBody,Vector3 force,Vector3 pos) - add a body force at body pos
- void RigidBodyAddBodyTorque(handle hRigidBody,Vector3 torque) - add torque to the body. The torque is specified relative to the body's axis system.
- void RigidBodyAddWorldTorque(handle hRigidBody,Vector3 torque) - add torque (in world coordinates) to the body.
- void RigidBodyAddBuoyanceForce(handle hRigidBody,float fluidDensity,float fluidLinearViscosity,float fluidAngularViscosity,Plane plane) - add buoyancy forces to the body
(last
updated
August 23, 2013
)