Cafu Engine
Cafu Engine Scripting
The open-source game engine and graphics engine for multiplayer, cross-platform, real-time 3D action
EntRigidBodyT Class Reference

A rigid body whose motion is controlled by rigid body dynamics as implemented by the physics engine. More...

Inheritance diagram for EntRigidBodyT:

Public Member Functions

 ApplyImpulse (number ix, number iy, number iz)
 Applies an impulse at the center of this body. More...
 
 SetGravity (number gx, number gy, number gz)
 Sets the gravity vector for this body. More...
 
- Public Member Functions inherited from BaseEntityT
string GetName ()
 Returns the name of this entity. More...
 
x y z GetOrigin ()
 Returns the origin of this entity as a triple of numbers. More...
 
 SetOrigin (number x, number y, number z)
 Sets a new position for this entity. More...
 

Detailed Description

A rigid body whose motion is controlled by rigid body dynamics as implemented by the physics engine.

Map Editor Name:
Rigid Body
Implementing C++ Class:
DeathMatch::EntRigidBodyT

Member Function Documentation

ApplyImpulse ( number  ix,
number  iy,
number  iz 
)

Applies an impulse at the center of this body.

SetGravity ( number  gx,
number  gy,
number  gz 
)

Sets the gravity vector for this body.

The default gravity vector is (0, 0, -9.81).

Example:
crate_001:SetGravity(0, 0, 9.81) -- This will "drop" the crate to the *ceiling*!