When I run the following code in my "ApplyForce" funciton, which is called when an object is clicked, nothing happens
Code: Select all
void PhysicsComponent::ApplyForce(glm::vec3& hitPoint, glm::vec3& direction, float amount)
{
if (!m_body)
return;
m_body->activate(true);
btVector3 force = btVector3(0, 1, 0) * amount;
m_body->applyImpulse(force, centerOfMass);
}
What could be causing this?