- Home /
Lerpz do not move at all
I'm following the official 3d tutorial for Unity 2.0, but on Unity 3.5. I'm at page 19, and at this part I'm supposed to adjust the player capsule collider, and then hit play. I did it, and Lerpz is supposed to move whenever I press the arrow keys, but nothing happens besides the camera starting from afar, and then closing on him.
I had to tweak the FadeoutLineOfSight.js
script, since the compiler complained about it's redeclaration of newMaterial
. So, on line 125 I changed
for (var newMaterial in fade.alphaMaterials)
Destroy(newMaterial);
To
for (var anotherNewMaterial in fade.alphaMaterials)
Destroy(anotherNewMaterial);
Also, I've got tons of this error message on the console:
NullReferenceException
FuelCellGlowLookAt.Update () (at Assets/Scripts/Misc/FuelCellGlowLookAt.js:7)
And some of this too:
NullReferenceException
ThirdPersonController.UpdateSmoothedMovementDirection () (at Assets/Scripts/Player/ThirdPersonController.js:105)
ThirdPersonController.Update () (at Assets/Scripts/Player/ThirdPersonController.js:320)
Any of these has some relation with Lerpz stubbornly standing still? Idf not, somebody can give some advice?
Answer by beef-Supreme · Aug 29, 2012 at 02:03 PM
Hi - I'm just learning Unity too. I was having this exact problem and was looking for the answer and found your question. I hadn't noticed all the errors in the console until reading this post, but I had them too - and this lead me to the answer :)
It turns out that 'NearCamera' in the hierarchy had been assigned the tag of 'Player' rather than 'MainCamera' which was causing errors because the scripts are referencing Camera.main.transform - which needs this tag to be set correctly - see Camera.main script reference
To rectify this - select the NearCamera in the hierarchy, then in the inspector change the tag to MainCamera. Then select Player in the hierarchy and check in the inspector that it has the tag of Player.
That fixed it for me and now I can continue with the tutorial! :)
I gave up on it, and ins$$anonymous$$d I started with something simpler, with this tutorial. It's really cool, and I learned a lot. I'll give another try on the official tutorial later, and your answer will come in handy. Thanks!
Your answer
Follow this Question
Related Questions
Lerpz tutorial problems 2 Answers
Lerpz tutorial page 22 1 Answer
LevelStatus in the 3D Platformer tutorial refuses to work(Using Unity 3.5). 0 Answers
Lerpz Tutorial Jumping Pad Issue 0 Answers
Lerpz Tutorial Problem 1 Answer