class PhysicsWorld

robot_2Generated
code_blocksInput

Description

The PhysicsWorld class represents a world in which physics objects exist. It is automatically created for the map both clientside and serverside, but you can create your own if needed.

Members

Instance Members

Member NameSummary
SetupPhysicsFromModelSets up physics from a model with a specified motion type.
DeleteDelete this world and all objects inside. Will throw an exception if you try to delete a world that you didn't manually create.
StepAdvances the physics simulation by a specified time step.
DebugDrawUpdates all the SceneObjects in the DebugSceneWorld, call once per tick or frame.
SetCollisionRulesSets collision rules for the physics world. (Obsolete: Use CollisionRules Property)
GetCollisionRuleRetrieves the collision rule between two specified entities.
RunTracePerforms a physics trace using the specified trace builder.
RunTraceAllPerforms a physics trace and returns all results using the specified trace builder.
BodiesAll bodies in the world.
CollisionRulesSet or retrieve the collision rules for this PhysicsWorld.
DebugSceneWorldA SceneWorld where debug SceneObjects exist.
GravityAccess the world's current gravity.
AirDensityAir density of this physics world, for things like air drag.
BodyThe body of this physics world.
GroupThe physics group of this physics world. A physics world will contain only 1 body.
SleepingEnabledIf true then bodies will be able to sleep after a period of inactivity.
SimulationModePhysics simulation mode. See PhysicsSimulationMode for explanation of each mode.
PositionIterationsUsed for constraints (joints). Higher values should result in more accurate simulation.
VelocityIterationsUsed for constraints (joints). Higher values should result in more accurate simulation.
SubStepsIf you're seeing objects go through other objects or you have a low tickrate, you might want to increase the number of physics substeps.
TimeScaleObsolete property for time scaling in the physics world.
TraceRaytrace against this world.