From f47170663cca8ae33ccb4cc38bfd4ef97104ff9a Mon Sep 17 00:00:00 2001 From: Dane Johnson Date: Sat, 30 Jan 2021 16:44:22 -0600 Subject: [PATCH] Wake up physic objects when activation with code --- core/Rigidbody.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/Rigidbody.cpp b/core/Rigidbody.cpp index fe999a4..cf04bbd 100644 --- a/core/Rigidbody.cpp +++ b/core/Rigidbody.cpp @@ -81,10 +81,12 @@ void Rigidbody::SetMass(float mass) { void Rigidbody::ApplyImpulse(Vector3 impulse) { btBody->applyCentralImpulse(btVector3(impulse.x, impulse.y, impulse.z)); + btBody->setActivationState(1); } void Rigidbody::ApplyForce(Vector3 force) { btBody->applyCentralForce(btVector3(force.x, force.y, force.z)); + btBody->setActivationState(1); }