You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-16 14:00:40 +00:00
Rigidbody wake up when hitten by a kinematic body
This commit is contained in:
@@ -1031,7 +1031,10 @@ bool SpaceBullet::recover_from_penetration(RigidBodyBullet *p_body, const btTran
|
|||||||
|
|
||||||
for (int i = recover_broad_result.result_collision_objects.size() - 1; 0 <= i; --i) {
|
for (int i = recover_broad_result.result_collision_objects.size() - 1; 0 <= i; --i) {
|
||||||
btCollisionObject *otherObject = recover_broad_result.result_collision_objects[i];
|
btCollisionObject *otherObject = recover_broad_result.result_collision_objects[i];
|
||||||
if (!p_body->get_bt_collision_object()->checkCollideWith(otherObject) || !otherObject->checkCollideWith(p_body->get_bt_collision_object()) || (p_infinite_inertia && !otherObject->isStaticOrKinematicObject()))
|
if (p_infinite_inertia && !otherObject->isStaticOrKinematicObject()) {
|
||||||
|
otherObject->activate(); // Force activation of hitten rigid, soft body
|
||||||
|
continue;
|
||||||
|
} else if (!p_body->get_bt_collision_object()->checkCollideWith(otherObject) || !otherObject->checkCollideWith(p_body->get_bt_collision_object()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (otherObject->getCollisionShape()->isCompound()) {
|
if (otherObject->getCollisionShape()->isCompound()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user