mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 21:17:01 +02:00
Merge pull request #6301 from sethalves/fix-grab-velocity
make held objects move tightly with hand (again)
This commit is contained in:
commit
bbe74f2e55
1 changed files with 0 additions and 2 deletions
|
@ -109,8 +109,6 @@ void AvatarActionHold::doKinematicUpdate(float deltaTimeStep) {
|
||||||
if (_previousSet) {
|
if (_previousSet) {
|
||||||
glm::vec3 positionalVelocity = (_positionalTarget - _previousPositionalTarget) / deltaTimeStep;
|
glm::vec3 positionalVelocity = (_positionalTarget - _previousPositionalTarget) / deltaTimeStep;
|
||||||
rigidBody->setLinearVelocity(glmToBullet(positionalVelocity));
|
rigidBody->setLinearVelocity(glmToBullet(positionalVelocity));
|
||||||
// back up along velocity a bit in order to smooth out a "vibrating" appearance
|
|
||||||
_positionalTarget -= positionalVelocity * deltaTimeStep / 2.0f;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue