Description
Describe the bug
I am using LOD in a scene with PointerLockControls, and currently the LOD system switches levels based on the distance from the center of the scene, not the actual camera position.
Expected behavior:
LOD should take the current camera position into account when using PointerLockControls, as the player moves through the scene and expects objects to update accordingly.
Actual behavior:
LOD uses the scene origin (or a fixed point) for distance calculation, so level switching does not reflect the player's movement accurately.
Additionally, there is no support for TresInstancedMesh. Right now, it replaces the entire instanced mesh instead of updating individual instances based on their distance to the camera.
Reproduction
lack
Steps to reproduce
Steps to reproduce
Set up a TresCanvas scene with LOD components and PointerLockControls.
Move the camera/player through the scene.
Observe that LOD transitions are not based on camera position.
Try using LOD with TresInstancedMesh and notice that all instances change at once.
System Info
Used Package Manager
npm
Code of Conduct
- I agree to follow this project's Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- The provided reproduction is a minimal reproducible example of the bug.