Mouse Wheel for Zoom doesn't work with C++

Hello,

I Try to make a simple ZoomIn and ZoomOut with the wheel mouse, but it seams that the wheel isn’t recognize when I launch the simulation, but with the Left and Right mouse button it work fine.

Here is my Input configuration :

98687-inputscapture.jpg

And my cpp file :

Hey fxmaker-

The mouse wheel reads the scroll of the mouse as a full event. So what’s actually happening is that when you scroll the mouse wheel in either direction, it is calling the Zoom function for that direction (in or out) and the StopZoom function at the same time.

To fix this, you can add two new functions for the mouse (mouse wheel up and mouse wheel down) and change the TargetArmLength in the new function rather than setting a boolean and updating the length on tick.

Cheers

I have replaced the boolean by the TargetArmLength directly in the two functions and it’s working fine !

Thanks a lot for your answer !