Quantcast
Channel: Answers for "Look at wont update?"
Viewing all articles
Browse latest Browse all 4

Answer by Eno-Khaon

$
0
0
Maybe I'm simply not understanding the intent, but why is the target looking 180 units away from the camera on the X axis, but towards itself on the Y and Z? If the intent is to rotate the effective X axis by 180 degrees, you wouldn't want to do that with the target direction you're getting this object to face. If you want a simple "face the same way as the camera, but straight along the ground" sort of thing, try: target.EulerAngles = Vector3(target.EulerAngles.x, transform.EulerAngles.y, target.EulerAngles.z); With this, you could also change the Y axis to (transform.EulerAngles.y + 180) as desired.

Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles



Latest Images