Difference between revisions of "ReactPhysics3D"
From GiderosMobile
m |
|||
Line 13: | Line 13: | ||
Basically you: | Basically you: | ||
− | # '''create the 3d world''' => [[ | + | # '''create the 3d world''' => [[r3d.World.new]] |
# '''add the 3d world DebugDraw (recommended for testing)''' => [[r3d.DebugDraw.new]] | # '''add the 3d world DebugDraw (recommended for testing)''' => [[r3d.DebugDraw.new]] | ||
− | # '''create your body''' => [[ | + | # '''create your body''' => [[r3d.World:createBody]] |
− | # '''define the shape of your body''' => example: a sphere [[ | + | # '''define the shape of your body''' => example: a sphere [[r3d.SphereShape.new]] |
− | # '''add the fixture''' => [[ | + | # '''add the fixture''' => [[r3d.Body:createFixture]]''' |
− | # '''add joints (optional)''' => example: a fixed joint [[ | + | # '''add joints (optional)''' => example: a fixed joint [[r3d.World:createFixedJoint]] |
# ''' HAVE FUN! ''' | # ''' HAVE FUN! ''' | ||
Revision as of 00:21, 23 March 2021
Supported platforms:
Available since: Gideros 2019.10
Description
ReactPhysics3D is an open source 3D physics and collision engine [React Physics 3D home page].
To add ReactPhysics3D engine to your application you call:
require "reactphysics3d"
Basically you:
- create the 3d world => r3d.World.new
- add the 3d world DebugDraw (recommended for testing) => r3d.DebugDraw.new
- create your body => r3d.World:createBody
- define the shape of your body => example: a sphere r3d.SphereShape.new
- add the fixture => r3d.Body:createFixture
- add joints (optional) => example: a fixed joint r3d.World:createFixedJoint
- HAVE FUN!
Classes