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.
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.
Member Name | Summary |
---|---|
SetupPhysicsFromModel | Sets up physics from a model with a specified motion type. |
Delete | Delete this world and all objects inside. Will throw an exception if you try to delete a world that you didn't manually create. |
Step | Advances the physics simulation by a specified time step. |
DebugDraw | Updates all the SceneObjects in the DebugSceneWorld, call once per tick or frame. |
SetCollisionRules | Sets collision rules for the physics world. (Obsolete: Use CollisionRules Property) |
GetCollisionRule | Retrieves the collision rule between two specified entities. |
RunTrace | Performs a physics trace using the specified trace builder. |
RunTraceAll | Performs a physics trace and returns all results using the specified trace builder. |
Bodies | All bodies in the world. |
CollisionRules | Set or retrieve the collision rules for this PhysicsWorld. |
DebugSceneWorld | A SceneWorld where debug SceneObjects exist. |
Gravity | Access the world's current gravity. |
AirDensity | Air density of this physics world, for things like air drag. |
Body | The body of this physics world. |
Group | The physics group of this physics world. A physics world will contain only 1 body. |
SleepingEnabled | If true then bodies will be able to sleep after a period of inactivity. |
SimulationMode | Physics simulation mode. See PhysicsSimulationMode for explanation of each mode. |
PositionIterations | Used for constraints (joints). Higher values should result in more accurate simulation. |
VelocityIterations | Used for constraints (joints). Higher values should result in more accurate simulation. |
SubSteps | If you're seeing objects go through other objects or you have a low tickrate, you might want to increase the number of physics substeps. |
TimeScale | Obsolete property for time scaling in the physics world. |
Trace | Raytrace against this world. |