mirror of
https://github.com/lubosz/overte.git
synced 2025-04-17 00:57:44 +02:00
Fix camera quick turn
This commit is contained in:
parent
36631dd3a3
commit
176f1beb08
1 changed files with 2 additions and 5 deletions
|
@ -448,11 +448,8 @@ CameraManager = function() {
|
|||
|
||||
var scale = Math.min(dt * EASING_MULTIPLIER, 1.0);
|
||||
|
||||
var dYaw = that.targetYaw - that.yaw;
|
||||
if (dYaw > 180) dYaw -= 360;
|
||||
if (dYaw < -180) dYaw += 360;
|
||||
|
||||
var dPitch = that.targetPitch - that.pitch;
|
||||
var dYaw = normalizeDegrees(that.targetYaw - that.yaw);
|
||||
var dPitch = normalizeDegrees(that.targetPitch - that.pitch);
|
||||
|
||||
that.yaw += scale * dYaw;
|
||||
that.pitch += scale * dPitch;
|
||||
|
|
Loading…
Reference in a new issue