mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 07:37:20 +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.
|
// code here for future reference.
|
||||||
// _palmRotationFromRigidBody = avatarRotationInverse * palmRotation;
|
// _palmRotationFromRigidBody = avatarRotationInverse * palmRotation;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
activateBody();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Avatar> AvatarActionHold::getTarget(glm::quat& rotation, glm::vec3& position) {
|
std::shared_ptr<Avatar> AvatarActionHold::getTarget(glm::quat& rotation, glm::vec3& position) {
|
||||||
|
@ -197,7 +199,6 @@ void AvatarActionHold::updateActionWorker(float deltaTimeStep) {
|
||||||
if (_kinematic) {
|
if (_kinematic) {
|
||||||
doKinematicUpdate(deltaTimeStep);
|
doKinematicUpdate(deltaTimeStep);
|
||||||
} else {
|
} else {
|
||||||
activateBody();
|
|
||||||
forceBodyNonStatic();
|
forceBodyNonStatic();
|
||||||
ObjectActionSpring::updateActionWorker(deltaTimeStep);
|
ObjectActionSpring::updateActionWorker(deltaTimeStep);
|
||||||
}
|
}
|
||||||
|
@ -247,7 +248,6 @@ void AvatarActionHold::doKinematicUpdate(float deltaTimeStep) {
|
||||||
_previousSet = true;
|
_previousSet = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
activateBody();
|
|
||||||
forceBodyNonStatic();
|
forceBodyNonStatic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,7 +344,6 @@ bool AvatarActionHold::updateArguments(QVariantMap arguments) {
|
||||||
ownerEntity->setActionDataNeedsTransmit(true);
|
ownerEntity->setActionDataNeedsTransmit(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
activateBody();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -431,6 +430,5 @@ void AvatarActionHold::deserialize(QByteArray serializedArguments) {
|
||||||
_active = true;
|
_active = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
activateBody();
|
|
||||||
forceBodyNonStatic();
|
forceBodyNonStatic();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue