use new NodePath-based interface for physics

This commit is contained in:
David Rose 2003-10-24 00:29:51 +00:00
parent 1395afcdd9
commit a5d8325bda

View File

@ -55,10 +55,11 @@ apply_linear_force(ColliderDef &def, const LVector3f &force) {
if (force == LVector3f::zero()) {
return;
}
if (!def._node) {
if (def._target.is_empty()) {
return;
}
ActorNode *actor=DCAST(ActorNode, def._node);
ActorNode *actor;
DCAST_INTO_V(actor, def._target.node());
LVector3f vel=actor->get_physics_object()->get_velocity();
if (vel == LVector3f::zero()) {
return;