working move kikle
This commit is contained in:
@@ -18,7 +18,7 @@ export interface CameraTransform {
|
||||
}
|
||||
|
||||
export const EBIKE_CAMERA_TRANSFORM: CameraTransform = {
|
||||
position: [-3, 6, 0],
|
||||
position: [-3.5, 6, 0],
|
||||
rotation: [-10, -90, 0],
|
||||
};
|
||||
|
||||
|
||||
@@ -278,17 +278,12 @@ export function PlayerController({
|
||||
}
|
||||
}
|
||||
|
||||
if (movementModeRef.current === "ebike") {
|
||||
_forward.set(Math.sin(ebikeAngle.current), 0, Math.cos(ebikeAngle.current)).normalize();
|
||||
_right.crossVectors(_forward, _up).normalize();
|
||||
} else {
|
||||
camera.getWorldDirection(_forward);
|
||||
_forward.setY(0);
|
||||
if (_forward.lengthSq() > 0) {
|
||||
_forward.normalize();
|
||||
_right.crossVectors(_forward, _up).normalize();
|
||||
}
|
||||
}
|
||||
|
||||
_wishDir.set(0, 0, 0);
|
||||
if (!movementLocked) {
|
||||
|
||||
Reference in New Issue
Block a user