Difference between revisions of "R3d.Body"
Line 54: | Line 54: | ||
[[Special:MyLanguage/r3d.Body:setLinearVelocity|r3d.Body:setLinearVelocity]] ''<translate>sets the body linear velocity</translate>''<br/> | [[Special:MyLanguage/r3d.Body:setLinearVelocity|r3d.Body:setLinearVelocity]] ''<translate>sets the body linear velocity</translate>''<br/> | ||
<!-- GIDEROSMTD:r3d.Body:setLinearVelocity(number) sets the body linear velocity --> | <!-- GIDEROSMTD:r3d.Body:setLinearVelocity(number) sets the body linear velocity --> | ||
− | [[Special:MyLanguage/r3d.Body:setMass|r3d.Body:setMass]] ''<translate>sets the body | + | [[Special:MyLanguage/r3d.Body:setMass|r3d.Body:setMass]] ''<translate>sets the mass of the body</translate>''<br/> |
− | <!-- GIDEROSMTD:r3d.Body:setMass(number) sets the body | + | <!-- GIDEROSMTD:r3d.Body:setMass(number) sets the mass of the body --> |
[[Special:MyLanguage/r3d.Body:setMaterial|r3d.Body:setMaterial]] ''<translate>sets the body material</translate>''<br/> | [[Special:MyLanguage/r3d.Body:setMaterial|r3d.Body:setMaterial]] ''<translate>sets the body material</translate>''<br/> | ||
<!-- GIDEROSMTD:r3d.Body:setMaterial(material) sets the body material --> | <!-- GIDEROSMTD:r3d.Body:setMaterial(material) sets the body material --> |
Revision as of 16:54, 11 February 2020
Supported platforms:
Available since: Gideros 2019.10
Description
Once the dynamics world has been created, you can create rigid bodies into the world.
A rigid body represents an object that you want to simulate in the world. It has a mass, a position, an orientation, a type, and one or several collision shapes. You can also create joints between the bodies in the world.
The dynamics world will compute collisions between the bodies and will update the bodies position and orientation accordingly every time step.
In ReactPhysics3D, the RigidBody class (which inherits from the CollisionBody class) is used to describe a rigid body.
Methodsr3d.Body:applyForce applies a force to this body |
Constantsr3d.Body.STATIC_BODY |