Difference between revisions of "R3d.World.new"
From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight") |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
Line 6: | Line 6: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
r3d.World.new(gravityX, gravityY, gravityZ) | r3d.World.new(gravityX, gravityY, gravityZ) | ||
− | </ | + | </syntaxhighlight> |
=== Parameters === | === Parameters === | ||
Line 17: | Line 17: | ||
require "reactphysics3d" | require "reactphysics3d" | ||
local world = r3d.World.new(0, -9.8, 0) | local world = r3d.World.new(0, -9.8, 0) | ||
− | </ | + | </syntaxhighlight> |
{{R3d.World}} | {{R3d.World}} |
Latest revision as of 14:32, 13 July 2023
Available since: Gideros 2019.10
Class: R3d.World
Description
Creates a new ReactPhysics3D dynamics world.
r3d.World.new(gravityX, gravityY, gravityZ)
Parameters
gravityX: (number) the gravity on the X axis (m/s^2)
gravityY: (number) the gravity on the Y axis (m/s^2)
gravityZ: (number) the gravity on the Z axis (m/s^2)
Example
require "reactphysics3d"
local world = r3d.World.new(0, -9.8, 0)
- 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