|
Hey people Ive got my character and I have attached my spotlight tomy character, my problem is that as soon as I put the script in : Standard Asseys> Scripts> MouseLook and play the game, my torch moves fasterthan my player. If I move my mouse 1 cm my person moves 1cm but my torch moves 5cm. If i move my person 2cm my torch flies 10cm away. Can somebody please tell me how to script this. And also I want my person to pick up a knife from the floor, how would he do it?
(comments are locked)
|
|
Are you trying to move the torch by script? You should instead just child the torch to your camera (if it's a 1st person character), and let Unity do the job for you: when the parent moves or rotates, its children automatically follow it.
(comments are locked)
|

Is it 3D or 2D? (models or sprites?) If you got models - I think the easiest way will be put some prefab and fix it on the place that you want you're knife/torch (in the Scene view) - then drag it into your Player (in Hierarchy view). Next you must just find how to switch what it contains.
Duplicate question of: http://answers.unity3d.com/questions/309291/how-to-make-my-torch-move-with-my-player-1.html