universalCamera with zoom - mouse wheel move doesn't detect collisions

Hello - In this playground https://playground.babylonjs.com/#6FHKHC#67 I enabled the non-FOV, universal-cam POSITIONAL zoom (dolly-in/out) with working mouse-wheel by @Wingnut. I also enabled collisions.

When zooming in using the arrow keys, the collisions work as expected (i.e., camera “bounces” off sphere). However, when zooming in using the mouse wheel, the camera passes through the sphere and ground. I am looking for ideas on how to enable collision detection to the mouse wheel movement. All help is appreciated.

Thanks,

Jeff

It seems you should update cameraDirection instead of position:

https://playground.babylonjs.com/#6FHKHC#68

1 Like

Thank you @Evgeni_Popov Works great!