- Home /
FPS Tutorial - FPS Controller doesn't work
I tried to follow the Unity 3D FPS Tutorial but soon after I started, I got an error message "Objekt reference not set to an instant of an object" in this line
var movement = thisTransform.TransformDirection( Vector3( moveTouchPad.position.x, 0, moveTouchPad.position.y ) );
The problem is the "moveTouchPad". How can I solve this?
Your snippet is useless. Where are thisTransform and moveTouchPad defined? What Tutorial are you referring to? Link? What do you want to achieve? For what platform do you develop? And btw "FPS Controller doesn't work" is not a question at all. Read the FAQs before posting, thx. http://answers.unity3d.com/faq
The error "Object reference not set to an instant of an object" often occurs when you have a variable exposed in the inspector with nothing attached to it.
$$anonymous$$ysteriously, the error disappeared when I deleted the project and redownloaded it again. Seems the download was just corrupt :/ @Bunny83:Yeah you're right, the question should be better "Why doesn't the FTP Controller work". Next time I will do it better :)