R3d.World:step
From GiderosMobile
Available since: Gideros 2019.10
Class: R3d.World
Description
The DynamicsWorld is used to simulate physics through time. It has to be updated each time you want to simulate a step forward in time. Most of the time, you want to update the world right before rendering a new frame in a real-time application.
This method will perform collision detection and update the position and orientation of the bodies and joints. After updating the world, you will be able to get the new position and orientation of your bodies for the next frame to render.
r3d.World:step(timeStep)
Parameters
timeStep: (number) the amount of time you want to advance the physics simulation (in seconds)
Example
stage:addEventListener(Event.ENTER_FRAME, function(e)
world:step(e.deltaTime)
end)
- R3d.World
- R3d.World.new
- R3d.World:createBallAndSocketJoint
- R3d.World:createBody
- R3d.World:createFixedJoint
- R3d.World:createHingeJoint
- R3d.World:createSliderJoint
- R3d.World:destroyBody
- R3d.World:destroyJoint
- R3d.World:raycast
- R3d.World:setEventListener
- R3d.World:step
- R3d.World:testAABBOverlap
- R3d.World:testCollision
- R3d.World:testOverlap