If you want to have an object turn automatically towards a target then you have to find out in which direction to turn. The usual angle function just returns the smallest angle between the current heading and the heading towards the target but not which way around. Vector3 lTarget = transform.InverseTransformPoint(target.position); targetDistance = lTarget.magnitude; targetAngle [...]
-
Pages
-
Categories
-
Archives
- January 2013
- July 2012
- June 2012
- May 2012
- March 2012
- February 2012
- January 2012
- October 2011
- September 2011
- August 2011
- June 2011
- May 2011
- January 2011
- February 2010
- January 2010
- October 2009
- April 2009
- March 2009
- November 2008
- August 2008
- June 2008
- May 2008
- February 2008
- January 2008
- November 2007
- October 2007