Hello I’m guessing this has a simple answer but I can’t seem to figure out the solution. I am getting a vector 2 of a controller’s left stick using the following code.
playerinput.currentActionMap.FindAction("Move").performed += ctx => LSInput = ctx.ReadValue<Vector2>();
The value that ends up in LSinput can be above the dead zone max value and below the dead zone min value. This happens even if I use a processor for the dead zone instead of the default settings.
Am I using the wrong command for this?
That would be expected behavior. The deadzone processor re-normalizes to [0…1] outside the deadzone range. In other words, if, say, your deadzone is min=0.1 and max=0.9, then values are clamped between those two values and the resulting [0.1…0.9] value is mapped to [0…1].
Ah ok sorry for the silly questions haha. My left stick vector 2 wasn’t zeroing out when let go. That was a helpful confirmation though. I guess my dead zone values just weren’t thick enough.
Oh actually it wasn’t really the dead zones I realized that with this event only my keyboard controls were getting stuck in one direction. I am also reading the value when movement is canceled now and that seems to have fixed both issues even if use a more shallow dead zone. Thanks for the help.