- Home /
Trying to have object spin within player and always face "up" relative to camera [example pics of what I'm trying to achieve in post]]
Not really sure the best way to describe what I'm aiming for, so here are some example photos of what I'd like to accomplish. (I paused and manually rotated the indicator arrow to show what I'm trying to achieve, and the arrow is double sided). I want to have that arrow's x and z rotation based on the player (the cart), and then have the arrow "spin within the cart" to face up/forward relative to the camera. The camera behaves like most third person cameras and orbits around the player.
Try positioning them using the local position of the camera. Camera.main.transform.up will get a Vector3 that always faces up in relation to the camera. Is that what you're looking for?
Im not sure I 100% understand but try to look into
transofrm.up Which gives the up vector of the transform Then you could use it with quaternion's rotate around property
Your answer
Follow this Question
Related Questions
Player rotates with camera(face same direction as the camera) 1 Answer
eulerAngles.y always returns 179.9999 1 Answer
How Can I Stop Rotation From This Script? 0 Answers
Look at wont update? 2 Answers