mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 09:29:02 +02:00
Merge pull request #2568 from birarda/hydra-move
repairs to hydraMove script to apply thrust from headOrientation
This commit is contained in:
commit
91ecbe9086
1 changed files with 4 additions and 4 deletions
|
@ -162,11 +162,11 @@ function flyWithHydra(deltaTime) {
|
||||||
if (thrustMultiplier < MAX_THRUST_MULTIPLIER) {
|
if (thrustMultiplier < MAX_THRUST_MULTIPLIER) {
|
||||||
thrustMultiplier *= 1 + (deltaTime * THRUST_INCREASE_RATE);
|
thrustMultiplier *= 1 + (deltaTime * THRUST_INCREASE_RATE);
|
||||||
}
|
}
|
||||||
var currentOrientation = MyAvatar.orientation;
|
var headOrientation = MyAvatar.headOrientation;
|
||||||
|
|
||||||
var front = Quat.getFront(currentOrientation);
|
var front = Quat.getFront(headOrientation);
|
||||||
var right = Quat.getRight(currentOrientation);
|
var right = Quat.getRight(headOrientation);
|
||||||
var up = Quat.getUp(currentOrientation);
|
var up = Quat.getUp(headOrientation);
|
||||||
|
|
||||||
var thrustFront = Vec3.multiply(front, MyAvatar.scale * THRUST_MAG_HAND_JETS *
|
var thrustFront = Vec3.multiply(front, MyAvatar.scale * THRUST_MAG_HAND_JETS *
|
||||||
thrustJoystickPosition.y * thrustMultiplier * deltaTime);
|
thrustJoystickPosition.y * thrustMultiplier * deltaTime);
|
||||||
|
|
Loading…
Reference in a new issue