You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First note that when you add a collision shape to a body, the shape will not be copied internally. You only give a pointer to the shape in parameter. The shape must exist during the whole lifetime of the body. This way, you can create a collision shape and reuse it for multiple bodies. You are also responsible to destroy the shape at the end when the bodies are not used anymore.
Testbed Code Comment (common/Sphere.cpp):
// Create the collision shape for the rigid body (sphere shape)
// ReactPhysics3D will clone this object to create an internal one. Therefore,
// it is OK if this object is destroyed right after calling RigidBody::addCollisionShape()
mCollisionShape = new rp3d::SphereShape(mRadius);
The User Manual and code is consistent. But the comment is expired.
The text was updated successfully, but these errors were encountered:
User Manual:
Testbed Code Comment (common/Sphere.cpp):
The User Manual and code is consistent. But the comment is expired.
The text was updated successfully, but these errors were encountered: