Enfusion Script API
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
PhysicsWorld Interface Reference

Physical simulation of the world. More...

Static Public Member Functions

static proto void SetInteractionLayer (notnull IEntity worldEntity, int mask1, int mask2, bool enable)
 Modifies interaction matrix of interaction layers.
 
static proto vector GetGravity (notnull IEntity worldEntity)
 Returns global gravity.
 
static proto void SetGravity (notnull IEntity worldEntity, vector g)
 Changes global gravity.
 
static proto float GetTimeSlice (notnull IEntity worldEntity)
 Returns current fixed time step of the physics simulation.
 
static proto int GetUpdateRate (notnull IEntity worldEntity)
 Returns current update rate of the physics simulation.
 
static proto void SetUpdateRate (notnull IEntity worldEntity, int updateRate)
 Sets update rate to change fixed time step of the physics simulation.
 
static proto int GetNumDynamicBodies (notnull IEntity worldEntity)
 Returns number of dynamic bodies.
 
static proto IEntity GetDynamicBody (notnull IEntity worldEntity, int index)
 Returns entity of a specified dynamic body.
 

Detailed Description

Physical simulation of the world.

Member Function Documentation

◆ GetDynamicBody()

static proto IEntity PhysicsWorld.GetDynamicBody ( notnull IEntity  worldEntity,
int  index 
)
static

Returns entity of a specified dynamic body.

Parameters
worldEntityEntity used to obtain world in which entities exist
indexIndex of a dynamic body. Must be within bounds (GetNumDynamicBodies)

◆ GetGravity()

static proto vector PhysicsWorld.GetGravity ( notnull IEntity  worldEntity)
static

Returns global gravity.

Parameters
worldEntityEntity used to obtain world in which entities exist

◆ GetNumDynamicBodies()

static proto int PhysicsWorld.GetNumDynamicBodies ( notnull IEntity  worldEntity)
static

Returns number of dynamic bodies.

Parameters
worldEntityEntity used to obtain world in which entities exist

◆ GetTimeSlice()

static proto float PhysicsWorld.GetTimeSlice ( notnull IEntity  worldEntity)
static

Returns current fixed time step of the physics simulation.

Parameters
worldEntityEntity used to obtain world in which entities exist

◆ GetUpdateRate()

static proto int PhysicsWorld.GetUpdateRate ( notnull IEntity  worldEntity)
static

Returns current update rate of the physics simulation.

Parameters
worldEntityEntity used to obtain world in which entities exist

◆ SetGravity()

static proto void PhysicsWorld.SetGravity ( notnull IEntity  worldEntity,
vector  g 
)
static

Changes global gravity.

Parameters
worldEntityEntity used to obtain world in which entities exist
gGlobal gravity vector

◆ SetInteractionLayer()

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

Modifies interaction matrix of interaction layers.

Parameters
worldEntityEntity used to obtain world in which entities exist
mask1Bit mask of layers
mask2Other bit mask of layers
enableTrue to enable, false to disable interaction

◆ SetUpdateRate()

static proto void PhysicsWorld.SetUpdateRate ( notnull IEntity  worldEntity,
int  updateRate 
)
static

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

Parameters
worldEntityEntity used to obtain world in which entities exist
updateRateUpdate rate of the physics simulation. Between 20 and 1000

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