So for example. I use the right trigger on the xbox controller. It works with a float from 0 to 1. When it’s set to 1 (fully pushed in). I want to do something for and on only 1 frame. So I guess that would be the next frame and only the next frame.
I think I’ll have to use a coroutine but I understand a coroutine also needs to be triggered to work. I’m using function update and in my experience it’s impossible since update runs once every frame.
I have no idea how to pull this off, have been looking for a year how to execute something on 1 frame only. I have been using invoke() but it’s imo a bad & imprecise solution to this problem.
I need a thorough and simple explanation please.
Using Input.GetKeyDown results in using only one frame. I need a result like this. But I’m using a float-based button in this case.