Difference between revisions of "R3d.Shape"

From GiderosMobile
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
<!-- GIDEROSOBJ:r3d.Shape -->
 
<!-- GIDEROSOBJ:r3d.Shape -->
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/>
+
'''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/>
'''<translate>Available since</translate>:''' Gideros 2019.10<br/>
+
'''Available since:''' Gideros 2019.10<br/>
  
 
=== Description ===
 
=== Description ===
 
Once you have created a rigid body in the world, you need to add one or more collision shapes to it so that it is able to collide with other bodies.
 
Once you have created a rigid body in the world, you need to add one or more collision shapes to it so that it is able to collide with other bodies.
 +
 +
A collision shape is used to describe the shape of a collider for collision detection. They are many types of collision shapes that you can use. They all inherit from the CollisionShape class.
  
 
The collision shapes are also the way to represent the mass of a Rigid Body. Whenever you add a collision shape to a rigid body, you need to specify the mass of the shape. Then the rigid body will recompute its total mass, its center of mass and its inertia tensor taking into account all its collision shapes.
 
The collision shapes are also the way to represent the mass of a Rigid Body. Whenever you add a collision shape to a rigid body, you need to specify the mass of the shape. Then the rigid body will recompute its total mass, its center of mass and its inertia tensor taking into account all its collision shapes.
 +
 +
'''Note: ReactPhysics3D does not support collision between two concave shapes, ConcaveMeshShape and HeightFieldShape'''
  
 
=== Classes ===
 
=== Classes ===
 
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
 
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<!--[[Special:MyLanguage/r3d.Shape|r3d.Shape]]<br/>-->
+
<!--[[r3d.BallAndSocketShape]] *'''NOT YET'''*<br/>--><!--GIDEROSOBJ:r3d.BallAndSocketShape-->
<!-- GIDEROSOBJ:r3d.Shape -->
+
[[r3d.BoxShape]]<br/><!--GIDEROSOBJ:r3d.BoxShape-->
<!--[[Special:MyLanguage/r3d.BallAndSocketShape|r3d.BallAndSocketShape]]<br/>***NOT YET IMPLEMENTED***-->
+
[[r3d.CapsuleShape]]<br/><!--GIDEROSOBJ:r3d.CapsuleShape-->
<!-- GIDEROSOBJ:r3d.BallAndSocketShape -->
+
[[r3d.ConcaveMeshShape]]<br/><!--GIDEROSOBJ:r3d.ConcaveMeshShape-->
[[Special:MyLanguage/r3d.BoxShape|r3d.BoxShape]]<br/>
+
[[r3d.ConvexMeshShape]]<br/><!--GIDEROSOBJ:r3d.ConvexMeshShape-->
<!-- GIDEROSOBJ:r3d.BoxShape -->
+
[[r3d.HeightFieldShape]]<br/><!--GIDEROSOBJ:r3d.HeightFieldShape-->
[[Special:MyLanguage/r3d.CapsuleShape|r3d.CapsuleShape]]<br/>
+
[[r3d.SphereShape]]<br/><!--GIDEROSOBJ:r3d.SphereShape-->
<!-- GIDEROSOBJ:r3d.CapsuleShape -->
 
[[Special:MyLanguage/r3d.ConcaveMeshShape|r3d.ConcaveMeshShape]]<br/>
 
<!-- GIDEROSOBJ:r3d.ConcaveMeshShape -->
 
[[Special:MyLanguage/r3d.ConvexMeshShape|r3d.ConvexMeshShape]]<br/>
 
<!-- GIDEROSOBJ:r3d.ConvexMeshShape -->
 
[[Special:MyLanguage/r3d.HeightFieldShape|r3d.HeightFieldShape]]<br/>
 
<!-- GIDEROSOBJ:r3d.HeightFieldShape -->
 
[[Special:MyLanguage/r3d.SphereShape|r3d.SphereShape]]<br/>
 
<!-- GIDEROSOBJ:r3d.SphereShape -->
 
 
</div>
 
</div>
 
  
 
----
 
----
 
'''[[ReactPhysics3D]]'''
 
'''[[ReactPhysics3D]]'''

Latest revision as of 03:05, 19 December 2025

Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.png
Available since: Gideros 2019.10

Description

Once you have created a rigid body in the world, you need to add one or more collision shapes to it so that it is able to collide with other bodies.

A collision shape is used to describe the shape of a collider for collision detection. They are many types of collision shapes that you can use. They all inherit from the CollisionShape class.

The collision shapes are also the way to represent the mass of a Rigid Body. Whenever you add a collision shape to a rigid body, you need to specify the mass of the shape. Then the rigid body will recompute its total mass, its center of mass and its inertia tensor taking into account all its collision shapes.

Note: ReactPhysics3D does not support collision between two concave shapes, ConcaveMeshShape and HeightFieldShape

Classes


ReactPhysics3D