mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 13:33:27 +02:00
fix the hydraMove script to pull you based on head orientation, not body
This commit is contained in:
parent
3c8aa90ae0
commit
0c28907609
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