Ignore projectiles inside of MovementSolver::unstuck. It is normal for actors to be inside of a

projectile collision shape.
A side effect of moving actors outside of projectile collision shape is that if both the actor and the projectile are
near a wall, the actor could get moved outside of the world.
pull/593/head
fredzio 4 years ago
parent ab28847eaf
commit b78820de55

@ -38,7 +38,7 @@ namespace MWPhysics
ContactCollectionCallback(const btCollisionObject * me, osg::Vec3f velocity) : mMe(me)
{
m_collisionFilterGroup = me->getBroadphaseHandle()->m_collisionFilterGroup;
m_collisionFilterMask = me->getBroadphaseHandle()->m_collisionFilterMask;
m_collisionFilterMask = me->getBroadphaseHandle()->m_collisionFilterMask & ~CollisionType_Projectile;
mVelocity = Misc::Convert::toBullet(velocity);
}
btScalar addSingleResult(btManifoldPoint & contact, const btCollisionObjectWrapper * colObj0Wrap, int partId0, int index0, const btCollisionObjectWrapper * colObj1Wrap, int partId1, int index1) override

Loading…
Cancel
Save