c-frame / aframe-gltf-model-plus

gltf-model-plus component to load glb file with hubs extensions
https://c-frame.github.io/aframe-gltf-model-plus/
Mozilla Public License 2.0
12 stars 5 forks source link

camera height on seat is wrong #33

Closed vincentfretin closed 8 months ago

vincentfretin commented 8 months ago

The camera height on a seat is wrong.

I do this in waypoint:

document.getElementById('rig').object3D.position.y = -0.45;

but simple-navmesh-constraint conflicts with it and override the value. If I do

document.getElementById('rig').setAttribute("simple-navmesh-constraint", "enabled", false);
document.getElementById('rig').object3D.position.y = -0.45;

it works properly. So I guess to fix that I need to disable the simple-navmesh-constraint component when seated, and enable it back in moved event.

vincentfretin commented 8 months ago

Ah no that's not it. The code I have is to offset the camera rig to show the avatar correctly seated and that part is working correctly, waypoint is at position 0.4, so substracting -0.45, it gives -0.05. What I need to do is lower the camera from 1.6 to 1.15.