Cancelling zoom (either through an event or code) can be "interrupted" by spamming the zoom button.

dandesign

New member
Hey,

So I've currently ran into a problem where I'm working on the player controller. I've set up a few triggers where the player can't use zoom. If the player is zooming, and they enter that trigger, the camera disallows zooming, and the camera starts returning to the normal FOV. The problem is, that the player can spam the zoom button, and the zoom will sort of "slow down" as if it's trying to zoom back in, but since zoom is disabled, it can't, and it just kind of eases to a stop, then continues zooming back out, until the player presses the zoom button, and this happens again.

Is there any way to prevent zooming input while the zoom is cancelling? I've tried setting "canZoom", changing the Zoom input name, setting the Zoom state to nothing, even activating a preset that disallows zoom, but still, when zooming out and spamming the zoom button, the behavior described above happens. Any thoughts? I've honestly no idea how it is getting zoom input, when it's set to nothing, and zooming is disabled. Is it possible that this is a bug?

Thanks.
 
Tried commenting out code that deals with the zoom behaviour, but to no avail. The little "jumps" still happen. Decided to just outright disable Fire2 input from Rewired while we're transitioning back to base FOV from a zoom, or just a simple FOV switch, then enable it back when that's done. A bit hacky, but it works.
 
Sounds like a glitched Zoom state to me. Can you reproduce it with minimal edits to the demo scene?
 
Can't repro on a clean project, but neither can I repro on my own project anymore. I've removed "Zoom State" string that UCC exposes from my "StopZoom" preset, and am only dealing with "Can Zoom", and it works perfectly now. Very strange.

Appreciate the reply.
 
Top