Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actuallukesmith123

Posted 17 March 2012 - 08:49 PM

EDIT:  Ah I realised I had made a stupid mistake elsewhere and the code that I originally posted was fine. Sorry!

#2lukesmith123

Posted 17 March 2012 - 08:41 PM

thanks for the reply. I realised I only really needed the rotation around the Y axis so I could just use arctan to deterime the rotation based on the vector.

#1lukesmith123

Posted 17 March 2012 - 08:07 PM

I am only really interested in the rotation around the Y axis from the direction.

I read on a forum thread that I can use atan2(direction.x, direction.z); to determine the Y axis rotation.

However when I do this the object faces in a particular direction no matter what values I put in direction.x and direction.z.

Hopefully somebody can help me here as I getting really confused.

PARTNERS