Merge pull request #1 from mhwdvs/fix/collisionBodyColliderTransform
Fix undefined behavior setting Collider transforms on a CollisionBody
This commit is contained in:
commit
e5af99cd87
|
@ -112,7 +112,7 @@ void Collider::setLocalToBodyTransform(const Transform& transform) {
|
|||
const Transform& bodyTransform = mBody->mWorld.mTransformComponents.getTransform(mBody->getEntity());
|
||||
mBody->mWorld.mCollidersComponents.setLocalToWorldTransform(mEntity, bodyTransform * transform);
|
||||
|
||||
RigidBody* rigidBody = static_cast<RigidBody*>(mBody);
|
||||
RigidBody* rigidBody = dynamic_cast<RigidBody*>(mBody);
|
||||
if (rigidBody != nullptr) {
|
||||
rigidBody->setIsSleeping(false);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user