mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
more generous pitch transition zones
This commit is contained in:
1 parent
1413475679
commit
9fc8a8e2a2
1 file changed
+2
-2
@@ -6,7 +6,7 @@ import {
|
|||||||
import { clamp } from "lodash-es";
|
import { clamp } from "lodash-es";
|
||||||
import { degToRad } from "three/src/math/MathUtils.js";
|
import { degToRad } from "three/src/math/MathUtils.js";
|
||||||
|
|
||||||
export const DEFAULT_PITCH_TRANSITION = 15;
|
export const DEFAULT_PITCH_TRANSITION = 20;
|
||||||
|
|
||||||
export function applyPitchYawLimits(
|
export function applyPitchYawLimits(
|
||||||
pitch: number, // rad
|
pitch: number, // rad
|
||||||
@@ -31,7 +31,7 @@ export function applyPitchYawLimits(
|
|||||||
let lowerPitch = -degToRad(pitchLimits.max) - depressionBuff;
|
let lowerPitch = -degToRad(pitchLimits.max) - depressionBuff;
|
||||||
let upperPitch = -degToRad(pitchLimits.min) + elevationBuff;
|
let upperPitch = -degToRad(pitchLimits.min) + elevationBuff;
|
||||||
const transition = degToRad(
|
const transition = degToRad(
|
||||||
pitchLimits.transition ?? DEFAULT_PITCH_TRANSITION,
|
pitchLimits.transition || DEFAULT_PITCH_TRANSITION,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (pitchLimits.back) {
|
if (pitchLimits.back) {
|
||||||
|
|||||||
Reference in new issue
Block a user