Update camera configuration and FPV controls: adjusted camera position, target, and distance values for improved viewing experience; modified jump speed, gravity, crouch height, and crouch speed in FPV controls for enhanced movement dynamics; refined eye height calculation in model loader for better alignment with model dimensions.
This commit is contained in:
@@ -305,10 +305,10 @@ export function updateFPVMovement(camera) {
|
||||
|
||||
const delta = 0.016; // Approximate 60fps
|
||||
const moveSpeed = 100.0; // Units per second
|
||||
const jumpSpeed = 220.0; // Jump initial velocity
|
||||
const gravity = 420.0; // Gravity strength
|
||||
const crouchHeight = window.eyeHeight * 0.5; // Crouch height
|
||||
const crouchSpeed = 100.0; // Speed of crouching transition
|
||||
const jumpSpeed = 500.0; // Jump initial velocity
|
||||
const gravity = 2000.0; // Gravity strength
|
||||
const crouchHeight = window.eyeHeight * 0.3; // Crouch height
|
||||
const crouchSpeed = 300.0; // Speed of crouching transition
|
||||
const flySpeed = 80.0; // Vertical fly speed
|
||||
|
||||
// Reset direction
|
||||
|
||||
@@ -234,7 +234,7 @@ function centerModelAndControls(object, camera, controls) {
|
||||
window.modelBounds = { boundingBox, center, size };
|
||||
window.groundLevel = boundingBox.min.y;
|
||||
window.ceilingLevel = boundingBox.max.y;
|
||||
window.eyeHeight = window.groundLevel + (window.ceilingLevel - window.groundLevel) * 0.5;
|
||||
window.eyeHeight = window.groundLevel + (window.ceilingLevel - window.groundLevel) * 0.55;
|
||||
|
||||
console.log('FPV bounds calculated:');
|
||||
console.log('Ground level:', window.groundLevel);
|
||||
|
||||
Reference in New Issue
Block a user