Difference between revisions of "R3d.World"
Line 35: | Line 35: | ||
[[Special:MyLanguage/r3d.World:setEventListener|r3d.World:setEventListener]] ''<translate>sets the event listener for collisions in the world</translate>''<br/> | [[Special:MyLanguage/r3d.World:setEventListener|r3d.World:setEventListener]] ''<translate>sets the event listener for collisions in the world</translate>''<br/> | ||
<!-- GIDEROSMTD:r3d.World:setEventListener(listener) sets the event listener for collisions in the world --> | <!-- GIDEROSMTD:r3d.World:setEventListener(listener) sets the event listener for collisions in the world --> | ||
− | [[ | + | [[r3d.World:createBallAndSocketJoint]] ''creates a ball and socket joint''<br/> |
− | <!-- GIDEROSMTD:r3d.World:createBallAndSocketJoint(bodyA,bodyB,anchorX,anchorY,anchorZ,params) | + | <!-- GIDEROSMTD:r3d.World:createBallAndSocketJoint(bodyA,bodyB,anchorX,anchorY,anchorZ,params) creates a ball and socket joint --> |
− | [[ | + | [[r3d.World:createHingeJoint]] ''creates a hinge joint''<br/> |
− | <!-- GIDEROSMTD:r3d.World:createHingeJoint(bodyA,bodyB,anchorX,anchorY,anchorZ,axisX,axisY,axisZ,params) | + | <!-- GIDEROSMTD:r3d.World:createHingeJoint(bodyA,bodyB,anchorX,anchorY,anchorZ,axisX,axisY,axisZ,params) creates a hinge joint --> |
− | [[ | + | [[r3d.World:createSliderJoint]] ''creates a slider joint''<br/> |
− | <!-- GIDEROSMTD:r3d.World:createSliderJoint(bodyA,bodyB,anchorX,anchorY,anchorZ,axisX,axisY,axisZ,params) | + | <!-- GIDEROSMTD:r3d.World:createSliderJoint(bodyA,bodyB,anchorX,anchorY,anchorZ,axisX,axisY,axisZ,params) creates a slider joint --> |
− | [[ | + | [[r3d.World:createFixedJoint]] ''creates a fixed joint'' <br/> |
− | <!-- GIDEROSMTD:r3d.World:createFixedJoint(bodyA,bodyB,anchorX,anchorY,anchorZ,params) | + | <!-- GIDEROSMTD:r3d.World:createFixedJoint(bodyA,bodyB,anchorX,anchorY,anchorZ,params) creates a fixed joint --> |
− | [[ | + | [[r3d.World:destroyJoint]] ''destroys a joint''<br/> |
<!-- GIDEROSMTD:r3d.World:destroyBody(joint) destroys a joint --> | <!-- GIDEROSMTD:r3d.World:destroyBody(joint) destroys a joint --> | ||
Revision as of 07:59, 8 January 2021
Supported platforms:
Available since: Gideros 2019.10
Description
A dynamics world is used to automatically simulate the motion of your bodies using the world physics.
Bodies will be automatically moved using collisions, joints and forces. You do not have to move the bodies manually (but you still can if needed).
The dynamics world will contain the bodies and joints that you create. You will then be able to run your simulation across time by updating the world at each frame.
The DynamicsWorld class (which inherits from the CollisionWorld class) represents a dynamics world in the ReactPhysics3D library.
Methodsr3d.World.new creates a new world |