Difference between revisions of "R3d.Body"
| Line 29: | Line 29: | ||
[[r3d.Body:enableGravity]] ''enables or disables gravity force on the body''<br/><!--GIDEROSMTD:r3d.Body:enableGravity(enable) enables or disables gravity force on the body--> | [[r3d.Body:enableGravity]] ''enables or disables gravity force on the body''<br/><!--GIDEROSMTD:r3d.Body:enableGravity(enable) enables or disables gravity force on the body--> | ||
[[r3d.Body:getAngularDamping]] ''gets the body angular damping''<br/><!--GIDEROSMTD:r3d.Body:getAngularDamping() gets the body angular damping--> | [[r3d.Body:getAngularDamping]] ''gets the body angular damping''<br/><!--GIDEROSMTD:r3d.Body:getAngularDamping() gets the body angular damping--> | ||
| + | [[r3d.Body:getAngularLockAxisFactor]] ''gets the angular lock axis factor of a rigid body''<br/><!--GIDEROSMTD:r3d.Body:getAngularLockAxisFactor() gets the angular lock axis factor of a rigid body--> | ||
[[r3d.Body:getAngularVelocity]] ''gets the body angular velocity''<br/><!--GIDEROSMTD:r3d.Body:getAngularVelocity() gets the body angular velocity--> | [[r3d.Body:getAngularVelocity]] ''gets the body angular velocity''<br/><!--GIDEROSMTD:r3d.Body:getAngularVelocity() gets the body angular velocity--> | ||
[[r3d.Body:getForce]] ''gets the body linear force''<br/><!--GIDEROSMTD:r3d.Body:getForce() gets the body linear force--> | [[r3d.Body:getForce]] ''gets the body linear force''<br/><!--GIDEROSMTD:r3d.Body:getForce() gets the body linear force--> | ||
[[r3d.Body:getLinearDamping]] ''gets the body linear damping''<br/><!--GIDEROSMTD:r3d.Body:getLinearDamping() gets the body linear damping--> | [[r3d.Body:getLinearDamping]] ''gets the body linear damping''<br/><!--GIDEROSMTD:r3d.Body:getLinearDamping() gets the body linear damping--> | ||
| + | [[r3d.Body:getLinearLockAxisFactor]] ''gets the linear lock axis factor of a rigid body''<br/><!--GIDEROSMTD:r3d.Body:getLinearLockAxisFactor() gets the linear lock axis factor of a rigid body--> | ||
[[r3d.Body:getLinearVelocity]] ''gets the body linear velocity''<br/><!--GIDEROSMTD:r3d.Body:getLinearVelocity() gets the body linear velocity--> | [[r3d.Body:getLinearVelocity]] ''gets the body linear velocity''<br/><!--GIDEROSMTD:r3d.Body:getLinearVelocity() gets the body linear velocity--> | ||
[[r3d.Body:getMass]] ''gets the body mass''<br/><!--GIDEROSMTD:r3d.Body:getMass() gets the body mass--> | [[r3d.Body:getMass]] ''gets the body mass''<br/><!--GIDEROSMTD:r3d.Body:getMass() gets the body mass--> | ||
Revision as of 21:56, 18 December 2025
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:applyLocalForceAtCenterOfMass applies a force to this body |
Constantsr3d.Body.STATIC_BODY |