rigidbody
Contents
| Name | Description |
|---|---|
| applyforce( direction , offset ) | Apply force at a reletive offset. |
| applyimpulse( impulse [, offset ] ) | Apply an impulse to the rigidboy |
| getadamping( ) | Gets the angular damping applied to this rigidbody |
| getgravity( ) | Gets the direction of gravity on this object. |
| getldamping( ) | Gets the damping applied to this rigidbody |
| getvelocity( ) | Gets the velocity of this object |
| setangfactor( dir ) | Sets the angular factor of the rigidbody |
| setdamping( damping , angular_damping ) | Sets the damping of this object. |
| setflags( flags ) | Sets flags on this rigidbody |
| setgravity( direction ) | Sets the direction of gravity on this object. |
| setvelocity( direction ) | Sets the velocity of this object |
applyforce( vector3d direction , vector3d offset )
Apply force at a reletive offset.
Parameters
-
direction (vector3d)
The direction of the force to apply
-
offset (vector3d)
The offset from the center of gravity to apply the force
Defined at shared/lua_api/phys/bphysgeneric.cpp:80
applyimpulse( vector3 impulse [ , vector3 offset ] )
Apply an impulse to the rigidboy
Parameters
-
impulse (vector3)
The direction to apply the impulse in
-
offset (optional) (vector3)
The offset from the center to apply the impulse,
default
{0, 0, 0}
Defined at shared/lua_api/phys/bphysgeneric.cpp:225
getadamping( )
Gets the angular damping applied to this rigidbody
Returns
-
damping The ammount of damping applied to angular momentum
Defined at shared/lua_api/phys/bphysgeneric.cpp:137
getgravity( )
Gets the direction of gravity on this object.
Returns
-
The direction of gravity on this object.
Defined at shared/lua_api/phys/bphysgeneric.cpp:64
getldamping( )
Gets the damping applied to this rigidbody
Returns
-
damping The ammount of damping applied to the object's momentum
Defined at shared/lua_api/phys/bphysgeneric.cpp:108
getvelocity( )
Gets the velocity of this object
Returns
-
The velocity in each direction
Defined at shared/lua_api/phys/bphysgeneric.cpp:152
setangfactor( vector3 dir )
Sets the angular factor of the rigidbody
TODO:What does this actually do?
Parameters
-
dir (vector3)
The direction to set the angular factor
Defined at shared/lua_api/phys/bphysgeneric.cpp:124
setdamping( number damping , number angular_damping )
Sets the damping of this object.
Parameters
-
damping (number)
The ammount of damping the object should put on it's movement.
-
angular_damping (number)
The ammount of damping the object should put on it's angular momentum
Defined at shared/lua_api/phys/bphysgeneric.cpp:188
setflags( number flags )
Sets flags on this rigidbody
Parameters
-
flags (number)
Defined at shared/lua_api/phys/bphysgeneric.cpp:208
setgravity( vector3d direction )
Sets the direction of gravity on this object.
Parameters
-
direction (vector3d)
The direction to make gravity point
Defined at shared/lua_api/phys/bphysgeneric.cpp:47
setvelocity( vector3d direction )
Sets the velocity of this object
Parameters
-
direction (vector3d)
The ammount on each axis to set the velocity of this object.
Defined at shared/lua_api/phys/bphysgeneric.cpp:168