Difference between revisions of "ReactPhysics3D"
From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")  | 
				|||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 8: | Line 8: | ||
To add '''ReactPhysics3D engine''' to your application you call:  | To add '''ReactPhysics3D engine''' to your application you call:  | ||
| − | <  | + | <syntaxhighlight lang="lua">  | 
require "reactphysics3d"  | require "reactphysics3d"  | ||
| − | </  | + | </syntaxhighlight>  | 
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! '''  | ||
| Line 27: | Line 27: | ||
[[r3d.Fixture]]<br/><!--GIDEROSOBJ:r3d.Fixture-->  | [[r3d.Fixture]]<br/><!--GIDEROSOBJ:r3d.Fixture-->  | ||
[[r3d.Joint]]<br/><!--GIDEROSOBJ:r3d.Joint-->  | [[r3d.Joint]]<br/><!--GIDEROSOBJ:r3d.Joint-->  | ||
| − | <!--[[  | + | <!--[[r3d.FixedJoint]]<br/>--><!--GIDEROSOBJ:r3d.FixedJoint-->  | 
| − | <!--[[  | + | <!--[[r3d.HingeJoint]]<br/>--><!--GIDEROSOBJ:r3d.HingeJoint-->  | 
[[r3d.Shape]]<br/><!--GIDEROSOBJ:r3d.Shape-->  | [[r3d.Shape]]<br/><!--GIDEROSOBJ:r3d.Shape-->  | ||
| − | <!--[[  | + | <!--[[r3d.BallAndSocketShape]]<br/>--><!--GIDEROSOBJ:r3d.BallAndSocketShape-->  | 
| − | <!--[[  | + | <!--[[r3d.BoxShape]]<br/>--><!--GIDEROSOBJ:r3d.BoxShape-->  | 
| − | <!--[[  | + | <!--[[r3d.CapsuleShape]]<br/>--><!--GIDEROSOBJ:r3d.CapsuleShape-->  | 
| − | <!--[[  | + | <!--[[r3d.ConcaveMeshShape]]<br/>--><!--GIDEROSOBJ:r3d.ConcaveMeshShape-->  | 
| − | <!--[[  | + | <!--[[r3d.ConvexMeshShape]]<br/>--><!--GIDEROSOBJ:r3d.ConvexMeshShape-->  | 
| − | <!--[[  | + | <!--[[r3d.HeightFieldShape]]<br/>--><!--GIDEROSOBJ:r3d.HeightFieldShape-->  | 
| − | <!--[[  | + | <!--[[r3d.SphereShape]]<br/>--><!--GIDEROSOBJ:r3d.SphereShape-->  | 
[[r3d.World]]<br /><!--GIDEROSOBJ:r3d.World-->  | [[r3d.World]]<br /><!--GIDEROSOBJ:r3d.World-->  | ||
</div>  | </div>  | ||
{{GIDEROS IMPORTANT LINKS}}  | {{GIDEROS IMPORTANT LINKS}}  | ||
Latest revision as of 14:32, 13 July 2023
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