RayMelius Claude Opus 4.6 commited on
Commit
d7953c9
·
1 Parent(s): a23c245

Fix FPV camera height to match agent scale, increase interact range

Browse files
Files changed (1) hide show
  1. web/3d.html +3 -3
web/3d.html CHANGED
@@ -3298,7 +3298,7 @@ const clock = new THREE.Clock();
3298
  let frameCount = 0;
3299
 
3300
  const _interactRay = new THREE.Raycaster();
3301
- _interactRay.far = 10;
3302
  function updateInteractPrompt() {
3303
  const prompt = document.getElementById('fp-interact-prompt');
3304
  if (chatTargetId || !fpControls.isLocked) { prompt.style.display = 'none'; return; }
@@ -3547,7 +3547,7 @@ const fpMoveState = { forward: false, backward: false, left: false, right: false
3547
  const fpVelocity = new THREE.Vector3();
3548
  const fpDirection = new THREE.Vector3();
3549
  const FP_SPEED = 12;
3550
- const FP_HEIGHT = 1.8;
3551
  let fpClock = new THREE.Clock();
3552
 
3553
  fpControls.addEventListener('lock', () => {
@@ -3627,7 +3627,7 @@ function fpInteract() {
3627
 
3628
  const ray = new THREE.Raycaster();
3629
  ray.setFromCamera(new THREE.Vector2(0, 0), fpCamera);
3630
- ray.far = 10;
3631
 
3632
  const agentObjs = [];
3633
  for (const [, m] of agentMeshes) agentObjs.push(m);
 
3298
  let frameCount = 0;
3299
 
3300
  const _interactRay = new THREE.Raycaster();
3301
+ _interactRay.far = 15;
3302
  function updateInteractPrompt() {
3303
  const prompt = document.getElementById('fp-interact-prompt');
3304
  if (chatTargetId || !fpControls.isLocked) { prompt.style.display = 'none'; return; }
 
3547
  const fpVelocity = new THREE.Vector3();
3548
  const fpDirection = new THREE.Vector3();
3549
  const FP_SPEED = 12;
3550
+ const FP_HEIGHT = 0.9;
3551
  let fpClock = new THREE.Clock();
3552
 
3553
  fpControls.addEventListener('lock', () => {
 
3627
 
3628
  const ray = new THREE.Raycaster();
3629
  ray.setFromCamera(new THREE.Vector2(0, 0), fpCamera);
3630
+ ray.far = 15;
3631
 
3632
  const agentObjs = [];
3633
  for (const [, m] of agentMeshes) agentObjs.push(m);