open-rmf / rmf-web

Apache License 2.0
87 stars 41 forks source link

Setting camera target to most negative number to handle arbitrary large maps #993

Closed aaronchongth closed 3 months ago

aaronchongth commented 3 months ago

What's new

Self-checks

aaronchongth commented 3 months ago

This changes the 3D position that the camera points towards, raising it to a large negative number implies that the camera will almost always be pointing down vertically, no matter where the camera is moved to in 3D space. This helps mimic an orthogonal view.

Although this value falls under the category of bigger-is-better, there's no harm in using the scene size to calculate it dynamically I guess.

I've also refactored the camera controls a little to reduce repeated construction of cameras and its controller

aaronchongth commented 3 months ago

As explained the purpose of these changes in DM