unity 3d student

Beginner B19 – Following with LookAt()



How to make objects rotate to face other objects using the Transform class’s LookAt function.

Code Used (Javascript)

var myTransform : Transform;
  1.  
  2. function Update () {
  3.  
  4.  transform.LookAt(myTransform);
  5.  
  6. }

Further Reading

Share via Social Media

  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • Add to favorites

17 Comments