Difference between revisions of "R3d.Body"
| Line 40: | Line 40: | ||
[[r3d.Body:resetTorque]] ''resets the body angular forces''<br/><!--GIDEROSMTD:r3d.Body:resetTorque() resets the body angular forces--> | [[r3d.Body:resetTorque]] ''resets the body angular forces''<br/><!--GIDEROSMTD:r3d.Body:resetTorque() resets the body angular forces--> | ||
[[r3d.Body:setAngularDamping]] ''sets the body angular damping''<br/><!--GIDEROSMTD:r3d.Body:setAngularDamping(number) sets the body angular damping--> | [[r3d.Body:setAngularDamping]] ''sets the body angular damping''<br/><!--GIDEROSMTD:r3d.Body:setAngularDamping(number) sets the body angular damping--> | ||
| + | [[r3d.Body:setAngularLockAxisFactor]] ''locks the body angular axis''<br/><!--GIDEROSMTD:r3d.Body:setAngularLockAxisFactor(number,number,number) locks the body angular axis--> | ||
[[r3d.Body:setAngularVelocity]] ''sets the body angular velocity''<br/><!--GIDEROSMTD:r3d.Body:setAngularVelocity(number) sets the body angular velocity--> | [[r3d.Body:setAngularVelocity]] ''sets the body angular velocity''<br/><!--GIDEROSMTD:r3d.Body:setAngularVelocity(number) sets the body angular velocity--> | ||
[[r3d.Body:setIsActive]] ''sets a body to active''<br/><!--GIDEROSMTD:r3d.Body:setIsActive(bool) sets a body to active--> | [[r3d.Body:setIsActive]] ''sets a body to active''<br/><!--GIDEROSMTD:r3d.Body:setIsActive(bool) sets a body to active--> | ||
| Line 45: | Line 46: | ||
[[r3d.Body:setIsSleeping]] ''sets a body to sleep''<br/><!--GIDEROSMTD:r3d.Body:setIsSleeping(bool) sets a body to sleep--> | [[r3d.Body:setIsSleeping]] ''sets a body to sleep''<br/><!--GIDEROSMTD:r3d.Body:setIsSleeping(bool) sets a body to sleep--> | ||
[[r3d.Body:setLinearDamping]] ''sets the body linear damping''<br/><!--GIDEROSMTD:r3d.Body:setLinearDamping(number) sets the body linear damping--> | [[r3d.Body:setLinearDamping]] ''sets the body linear damping''<br/><!--GIDEROSMTD:r3d.Body:setLinearDamping(number) sets the body linear damping--> | ||
| + | [[r3d.Body:setLinearLockAxisFactor]] ''locks the body linear axis''<br/><!--GIDEROSMTD:r3d.Body:setLinearLockAxisFactor(number,number,number) locks the body linear axis--> | ||
[[r3d.Body:setLinearVelocity]] ''sets the body linear velocity''<br/><!--GIDEROSMTD:r3d.Body:setLinearVelocity(number) sets the body linear velocity--> | [[r3d.Body:setLinearVelocity]] ''sets the body linear velocity''<br/><!--GIDEROSMTD:r3d.Body:setLinearVelocity(number) sets the body linear velocity--> | ||
[[r3d.Body:setMass]] ''sets the mass of the body''<br/><!--GIDEROSMTD:r3d.Body:setMass(number) sets the mass of the body--> | [[r3d.Body:setMass]] ''sets the mass of the body''<br/><!--GIDEROSMTD:r3d.Body:setMass(number) sets the mass of the body--> | ||
Revision as of 13:25, 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 |