rdiankov / openrave

Open Robotics Automation Virtual Environment: An environment for testing, developing, and deploying robotics motion planning algorithms.
http://www.openrave.org
Other
706 stars 344 forks source link

Clamp camera distance when zooming, handle all scroll events with Zoom() #1373

Closed seanzhang15 closed 5 months ago

seanzhang15 commented 5 months ago

This PR clamps camera distance to a maximum of 10^10 when zooming. This prevents the viewer published state from breaking the json parser due to large values.

To override the osg default zoom behavior, this PR also lets the Zoom function handle all scroll events.

rdiankov commented 5 months ago

thanks

braineo commented 5 months ago

this only handles the mouse input, you also want to handle when the distance is set programmatically