DIFF

class PhysicsWorldsealedSource

Physical simulation of the world

Constructors 2

private void PhysicsWorld()
private void ~PhysicsWorld()

Methods 8

static proto void SetInteractionLayer(notnull IEntity worldEntity, int mask1, int mask2, bool enable)

Modifies interaction matrix of interaction layers

worldEntity
Entity used to obtain world in which entities exist
mask1
Bit mask of layers
mask2
Other bit mask of layers
enable
True to enable, false to disable interaction
static proto vector GetGravity(notnull IEntity worldEntity)

Returns global gravity

worldEntity
Entity used to obtain world in which entities exist
static proto void SetGravity(notnull IEntity worldEntity, vector g)

Changes global gravity.

worldEntity
Entity used to obtain world in which entities exist
g
Global gravity vector
static proto float GetTimeSlice(notnull IEntity worldEntity)

Returns current fixed time step of the physics simulation

worldEntity
Entity used to obtain world in which entities exist
static proto int GetUpdateRate(notnull IEntity worldEntity)

Returns current update rate of the physics simulation

worldEntity
Entity used to obtain world in which entities exist
static proto void SetUpdateRate(notnull IEntity worldEntity, int updateRate)

Sets update rate to change fixed time step of the physics simulation

worldEntity
Entity used to obtain world in which entities exist
updateRate
Update rate of the physics simulation. Between 20 and 1000
static proto int GetNumDynamicBodies(notnull IEntity worldEntity)

Returns number of dynamic bodies

worldEntity
Entity used to obtain world in which entities exist
static proto IEntity GetDynamicBody(notnull IEntity worldEntity, int index)

Returns entity of a specified dynamic body

worldEntity
Entity used to obtain world in which entities exist
index
Index of a dynamic body. Must be within bounds (GetNumDynamicBodies)