- Home /
Transform.LookAt Function Customizations...
I am trying to "billboard" a 3D object to my main camera, but when I do transform.LookAt(camera.transform.position) It points the positive Z-axis (Vector3.forward) towards the camera. I understand this is the standard behavior, however, the way my object is oriented, the positive X-Axis (Vector3.right) is the axis I wish to point at the camera. Is there any way to do this?
Thanks in advance!
Is there a reason you can put the object in a parent gameObject and then orient your object to be z forward.
Hmm... so simple. Why didn't I think of this? Thanks man! Does the trick!
Answer by bamacsguy · Apr 12, 2012 at 03:16 PM
"Is there [any] reason you can['t] put the object in a parent gameObject and then orient your object to be z forward."
Adamcbrz
This was a viable solution.
Your answer
Follow this Question
Related Questions
LookAt fails at close range. 1 Answer
Lock rotation axis? 4 Answers
LookAt Problem 1 Answer
Hello, Need some help with Enemy facing the player on z axis !! 0 Answers
hoe to rotate a AI as a animation 1 Answer