DanielChappuis / reactphysics3d

Open source C++ physics engine library in 3D
http://www.reactphysics3d.com
zlib License
1.55k stars 224 forks source link

Set Collider Transform assumes that mBody is a RigidBody #362

Closed AlexanderGhosh closed 8 months ago

AlexanderGhosh commented 12 months ago

In the function Collider::setLocalToBodyTransform it makes the assumption that 'mBody' is a RigidBody

RigidBody* rigidBody = static_cast<RigidBody*>(mBody);
if (rigidBody != nullptr) {
    rigidBody->setIsSleeping(false);
}

however this assumption doesn't not hold when the Collider is attached to a CollisionBody causing an assertion to fail when calling RigidBody::setIsSleeping

DanielChappuis commented 9 months ago

Thanks for reporting this issue. This is already fixed in the 'develop' branch and will be part of the next release of the library.

DanielChappuis commented 8 months ago

This is now fixed in version v0.10.0 of the library. Thanks a lot for reporting the issue.