mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
experimenting
This commit is contained in:
parent
1cf57b27a9
commit
eac144f354
2 changed files with 10 additions and 1 deletions
|
@ -204,8 +204,15 @@ void AvatarActionHold::doKinematicUpdate(float deltaTimeStep) {
|
|||
}
|
||||
|
||||
withWriteLock([&]{
|
||||
if (_previousSet) {
|
||||
_measuredLinearVelocity = (_positionalTarget - _previousPositionalTarget) / deltaTimeStep;
|
||||
} else {
|
||||
_measuredLinearVelocity = glm::vec3();
|
||||
}
|
||||
|
||||
if (_kinematicSetVelocity) {
|
||||
rigidBody->setLinearVelocity(glmToBullet(_linearVelocityTarget));
|
||||
// rigidBody->setLinearVelocity(glmToBullet(_linearVelocityTarget));
|
||||
rigidBody->setLinearVelocity(glmToBullet(_measuredLinearVelocity));
|
||||
rigidBody->setAngularVelocity(glmToBullet(_angularVelocityTarget));
|
||||
}
|
||||
|
||||
|
|
|
@ -64,6 +64,8 @@ private:
|
|||
glm::vec3 _palmOffsetFromRigidBody;
|
||||
// leaving this here for future refernece.
|
||||
// glm::quat _palmRotationFromRigidBody;
|
||||
|
||||
glm::vec3 _measuredLinearVelocity;
|
||||
};
|
||||
|
||||
#endif // hifi_AvatarActionHold_h
|
||||
|
|
Loading…
Reference in a new issue