1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Improved kinematic body 2D and 3D, Now can move rigid body

This commit is contained in:
Andrea Catania
2018-02-16 19:06:00 +01:00
parent da612c324c
commit 6ed392f47a
22 changed files with 96 additions and 88 deletions

View File

@@ -98,11 +98,16 @@ bool GodotKinClosestConvexResultCallback::needsCollision(btBroadphaseProxy *prox
if (gObj == m_self_object) {
return false;
} else {
if (m_ignore_areas && gObj->getType() == CollisionObjectBullet::TYPE_AREA) {
// A kinematic body can't be stopped by a rigid body since the mass of kinematic body is infinite
if (m_infinite_inertia && !btObj->isStaticOrKinematicObject())
return false;
} else if (m_self_object->has_collision_exception(gObj)) {
if (gObj->getType() == CollisionObjectBullet::TYPE_AREA)
return false;
if (m_self_object->has_collision_exception(gObj))
return false;
}
}
return true;
} else {