R3d.World

From GiderosMobile
Revision as of 05:50, 21 January 2020 by MoKaLux (talk | contribs) (starting a new challenge :-))


Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.png
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.

Methods

r3d.World.new create a new world
r3d.World:createBody create a new body
r3d.World:destroyBody destroy a body
r3d.World:step Step the world
r3d.World:raycast perform a ray cast on the world
r3d.World:testOverlap check if two bodies overlap
r3d.World:testAABBOverlap check if two bodies AABB overlap
r3d.World:testCollision check collisions
r3d.World:setEventListener set the event listener for collisions in the world
r3d.World:createBallAndSocketJoint
r3d.World:createHingeJoint
r3d.World:createSliderJoint
r3d.World:createFixedJoint
r3d.World:destroyJoint destroy a joint