Beginner needs help with camera question,

Im trying to setup my max and min pitch amounts for my third person camera, and im trying to have the camera auto-center or auto-level the pitch axis when there isnt input from the gamepad right stick or mouse after a small delay. Im using EnhancedInputAction system, within blueprints.
AI keeps telling to add a branch off the Green Y Value node.. but i cant do that unless im clueless about something…

Hi there :slight_smile:

Modify your Aim function in your Third Person Character like this:

This will limit your Pitch between Min Pitch and Max Pitch an will also record the time of the last change that we will use later. (Note that the time is recorded even if the movement is perfectly horizontal but it happens rarely anyway)

Next add this in your Third Person Character

Now since we are adding Pitch each frame there is a real possibility to overshoot and move too much which will trigger movement in the other direction and so on. This creates a very bad jitter especially if your Reset Speed is high and your frame-rate low. This is why I opted for less precision and made the Error Tolerance quite high so it it will always end before the last move and before having chance to overshoot. This can be done in multiple more-precise ways but it makes it quite more complex.

Hope this gives you simple enough base you can modify and play around with.

Thank you so much!! i would of never guessed anywhere close to that. And you made it so the values are easy to adjust! i found setting the pitch reset speed to 15 and the delay to 1.3 seconds to work great!