mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-13 10:03:15 +02:00
minor cleanup
This commit is contained in:
parent
e5d947422a
commit
612dc9d226
1 changed files with 1 additions and 4 deletions
|
@ -1197,8 +1197,6 @@ void MyAvatar::updatePosition(float deltaTime) {
|
|||
|
||||
float motorEfficiency = glm::clamp(deltaTime / computeMotorTimescale(velocity), 0.0f, 1.0f);
|
||||
|
||||
// compute targetVelocity
|
||||
glm::vec3 targetVelocity(0.0f);
|
||||
if (_motionBehaviors & AVATAR_MOTION_MOTOR_KEYBOARD_ENABLED) {
|
||||
float keyboardInput = fabsf(_driveKeys[FWD] - _driveKeys[BACK]) +
|
||||
(fabsf(_driveKeys[RIGHT] - _driveKeys[LEFT])) +
|
||||
|
@ -1235,13 +1233,12 @@ void MyAvatar::updatePosition(float deltaTime) {
|
|||
}
|
||||
_isPushing = true;
|
||||
}
|
||||
targetVelocity = _motorVelocity;
|
||||
} else {
|
||||
_motorVelocity = glm::vec3(0.0f);
|
||||
}
|
||||
}
|
||||
targetVelocity = getHead()->getCameraOrientation() * targetVelocity;
|
||||
|
||||
glm::vec3 targetVelocity = getHead()->getCameraOrientation() * _motorVelocity;
|
||||
glm::vec3 deltaVelocity = targetVelocity - velocity;
|
||||
|
||||
if (walkingOnFloor && !pushingUp) {
|
||||
|
|
Loading…
Reference in a new issue