Hello,
I am making a game in unity and I have used unity’s new input system and I am facing a problem that whenever I look down and move by pressing s (back) or whenever I look up and move using w (forward)
player jumps in both cases.
Any suggestions ??
Thanks in advance.
Probably your player trying move into air, you can set your camera to child of moving parent body, and adapt controller scripts to the parent transform. Probably camera changing your moving object’s rotation and player trying to move in the direction to you’re looking because of “transform.forward”. Transform.forward always calculates orientation of transforms forward even if you look at the air