mirror of
https://github.com/lubosz/overte.git
synced 2025-04-19 17:03:43 +02:00
Scale Parabola Pick acceleration before rotating it
This commit is contained in:
parent
f3f9976cfb
commit
728f8aeecd
1 changed files with 3 additions and 3 deletions
|
@ -43,14 +43,14 @@ PickParabola ParabolaPick::getMathematicalPick() const {
|
|||
velocity = glm::normalize(transformedVelocity) * _speed;
|
||||
}
|
||||
glm::vec3 acceleration = _mathPick.acceleration;
|
||||
if (_scaleWithParent) {
|
||||
acceleration *= currentParentTransform.getScale();
|
||||
}
|
||||
if (_rotateAccelerationWithAvatar) {
|
||||
acceleration = DependencyManager::get<AvatarManager>()->getMyAvatar()->getWorldOrientation() * acceleration;
|
||||
} else if (_rotateAccelerationWithParent) {
|
||||
acceleration = currentParentTransform.getRotation() * acceleration;
|
||||
}
|
||||
if (_scaleWithParent) {
|
||||
acceleration *= currentParentTransform.getScale();
|
||||
}
|
||||
|
||||
return PickParabola(position, velocity, acceleration);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue