|
Sorry if someone has already answered this. I've looked and haven't found anything like whats happening to me. I have a point in space (Vector3) that I want the object to smoothly turn to but I cant seem to make the code work:
When I run this I get an error stating the the "Object reference not set to an instance of and object" and is states the var target line as where the error starts. Any help would be much appreciated.
(comments are locked)
|
|
Try this:
Hope that helps. Sorry about that... I figured it out. It was that variable that I was using. I didn't have it outside the Update function so it kept getting overwritten as a null which was causing the error. Thank you for the help, your script works perfectly.
Mar 26 '10 at 04:45 AM
collypoo
(comments are locked)
|
|
omg thank you very much, the smoothness of turning was perfect! Yeah no problem. Just check the FPS tutorial. There are a bunch of nice stuff there: http://unity3d.com/support/resources/tutorials/fpstutorial Cheers
Apr 16 '10 at 08:39 PM
Tuti
(comments are locked)
|
