How to clamp position with new Input system and rigidbody velocity?

So, I am trying it with the new input system and body velocity as learned it already, but clamping works with the location and I am not doing that, so how to handle it …

Anybody ?

No matter, I just managed to get it done the usual way without any clamping …


We teachings assistants work during working days only. If nobody replies to you at the weekend or if you need fast help, please feel free to join our Discord chat server. :slight_smile:

Regarding your problem, the position does not have anything to do with the velocity or input system. For this reason, you can simply use Mathf.Clamp with transform.position to clamp the position.

If you found another solution for the problem, that’s also fine. In many cases, there are multiple ways to do something in Unity. :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms