mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 17:24:08 +02:00
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:
parent
e1299ee290
commit
5d0604b8d3
1 changed files with 2 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue