You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When CameraControl#followPointer is true, then every time a mouse wheel event is handled, CameraControl does a ray-pick to get the distance to the nearest object on the line-of-sight.
The forward dolly speed is then adjusted, to make it inversely proportional to the distance.
Problem here is that we do the ray pick on every mouse wheel event.
We could instead do the ray-pick once, on the first mouse wheel event since the last mouse move event, saving the picked surface position. Then we can compute the distance as the the distance from our current eye position to that surface point on each subsequent mouse wheel event, until the next mouse move event, then adjusting the dolly speed by that etc.
This must also be done for touch and keyboard dollying.
The text was updated successfully, but these errors were encountered:
When
CameraControl#followPointer
istrue
, then every time a mouse wheel event is handled,CameraControl
does a ray-pick to get the distance to the nearest object on the line-of-sight.The forward dolly speed is then adjusted, to make it inversely proportional to the distance.
Problem here is that we do the ray pick on every mouse wheel event.
We could instead do the ray-pick once, on the first mouse wheel event since the last mouse move event, saving the picked surface position. Then we can compute the distance as the the distance from our current eye position to that surface point on each subsequent mouse wheel event, until the next mouse move event, then adjusting the dolly speed by that etc.
This must also be done for touch and keyboard dollying.
The text was updated successfully, but these errors were encountered: