mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 02:48:12 +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;
|
velocity = glm::normalize(transformedVelocity) * _speed;
|
||||||
}
|
}
|
||||||
glm::vec3 acceleration = _mathPick.acceleration;
|
glm::vec3 acceleration = _mathPick.acceleration;
|
||||||
|
if (_scaleWithParent) {
|
||||||
|
acceleration *= currentParentTransform.getScale();
|
||||||
|
}
|
||||||
if (_rotateAccelerationWithAvatar) {
|
if (_rotateAccelerationWithAvatar) {
|
||||||
acceleration = DependencyManager::get<AvatarManager>()->getMyAvatar()->getWorldOrientation() * acceleration;
|
acceleration = DependencyManager::get<AvatarManager>()->getMyAvatar()->getWorldOrientation() * acceleration;
|
||||||
} else if (_rotateAccelerationWithParent) {
|
} else if (_rotateAccelerationWithParent) {
|
||||||
acceleration = currentParentTransform.getRotation() * acceleration;
|
acceleration = currentParentTransform.getRotation() * acceleration;
|
||||||
}
|
}
|
||||||
if (_scaleWithParent) {
|
|
||||||
acceleration *= currentParentTransform.getScale();
|
|
||||||
}
|
|
||||||
|
|
||||||
return PickParabola(position, velocity, acceleration);
|
return PickParabola(position, velocity, acceleration);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue