NullReferenceException: Object reference not set to an instance of an object
ThirdPersonController.UpdateSmoothedMovementDirection () (at Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js:129)
ThirdPersonController.Update () (at Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js:302)
The 3rd Person Controller is not workin correctly
1593877–95809–$Neue Bitmap.bmp (1.37 MB)
Can you show me the two lines that are causing the error(129 and 302)?
129 var cameraTransform = Camera.main.transform;
302 UpdateSmoothedMovementDirection();
Package from unity Character Controller
but if i add First Person Controller the The 3rd Person Controller works
You don’t have a camera in your scene, just add one and it should work.
What do you mean, the camera can’t move or the person. Have you removed the first person controller?
Try deleting the whole controller, and then add it back in making sure you have a camera in the scene first.
ok the problem was the cotroller script was not imported
So everything is working ok?