So I’m having a bit of an issue like this: If I get out of my car and it just so happens to be on top of, say, someone’s body, the camera for the player is stuck at the same rotations as the car was when you got out. I feel like this is a simple thing to fix with a transform.eulerangles, or something like that, but I’m a bit confused as to exactly how to word it. Here’s how I instantiate my player:
Player = Instantiate(GameObject.Find("Clone"), exitPosition, transform.rotation) as GameObject;
I’d like to use a variable exitRotation in place of transform.rotation, and make it so that when I get out, I’m still facing the same direction as the car, but I’m looking level at the world. So basically, set x and z to zero, but keep y (unless I’m getting my axis mixed up :P)