Hi. The new input system is pretty awesome for handling various input devices, but it doesn’t have an equivalent to the old “getAxisRaw” method yet.
This is a problem in my game as I would have a lot of trouble pausing everything manually, especially the particle effects, which I don’t want to keep moving while paused. …But I also really need a pause menu. So input has to be read while timescale = 0.
In the migration documentation (Migrate From Old Input System | Package Manager UI website), they mention there is a workaround with InputControl<>.ReadUnprocessedValue().
But because I am still pretty inexperienced. I can’t figure out how this works. I am desperately looking for an example that would help me understand how this works.
Thanks a lot for any advice you may have.
What’s the problem you’re having with reading input when timescale is zero? Is something not working?
Wait, stuff like below is supposed to work even at timescale 0? Then why does the migration documentation mentions this?
//Get status of X axis
public void ReadAxis_X(InputAction.CallbackContext context)
{
ctrl_axisValue_x = context.ReadValue<float>();
}
If that’s what you meant, then the issue has to be something else and i misinterpreted it (because I’m a noob XD).
I suspect the issue, then, would be that my devices (gamepad and keyboard) are not transferring properly from one “player input” component to another (I have two in the scene, but not active at the same time).
…Any tips on that, then?
OK. I made a test, and the function is indeed called even when Timescale = 0. I should have tried despite getting confused by the documentation, and I would have seen it. My bad.
But then, the problem truly is that the gamepad and keyboard are not transferring to the new “Player Input” component, despite the old one being disabled. So I’ll change the topic of the thread to that.