activateBody doesn't help if called from inside the action callback, because the callback isn't called on inactive bodies. call it from the setup routine, instead

This commit is contained in:
Seth Alves 2016-01-03 07:33:10 -08:00
parent e1299ee290
commit 5d0604b8d3

View file

@ -89,6 +89,8 @@ void AvatarActionHold::prepareForPhysicsSimulation() {
// code here for future reference.
// _palmRotationFromRigidBody = avatarRotationInverse * palmRotation;
});
activateBody();
}
std::shared_ptr<Avatar> AvatarActionHold::getTarget(glm::quat& rotation, glm::vec3& position) {
@ -197,7 +199,6 @@ void AvatarActionHold::updateActionWorker(float deltaTimeStep) {
if (_kinematic) {
doKinematicUpdate(deltaTimeStep);
} else {
activateBody();
forceBodyNonStatic();
ObjectActionSpring::updateActionWorker(deltaTimeStep);
}
@ -247,7 +248,6 @@ void AvatarActionHold::doKinematicUpdate(float deltaTimeStep) {
_previousSet = true;
});
activateBody();
forceBodyNonStatic();
}
@ -344,7 +344,6 @@ bool AvatarActionHold::updateArguments(QVariantMap arguments) {
ownerEntity->setActionDataNeedsTransmit(true);
}
});
activateBody();
}
return true;
@ -431,6 +430,5 @@ void AvatarActionHold::deserialize(QByteArray serializedArguments) {
_active = true;
});
activateBody();
forceBodyNonStatic();
}