I want a Sphere to follow a hand. The sphere is created in script.
My Problem is that the sphere is moving randomly around and not fixing to his parent…
My Code:
If the child is parented to the hand and you want it to remain attached to the hand, I don’t think you should be changing the position of the ball at all.
Just move the hand, and the ball will automagically stay with it.
Ah ok, that sounds good. The only problem is, it’s still moving randomly!
I just commented out the Rigidbody and everthing works fine… is there any possibility to switch it off or deaktivate it? Sleep() and Awake() didn’t work. I could add and remove it but there is no RemoveComponent() Method or is there?
Hi @Meltdown ,@cmccown ,
I ran into a similar issue where a child should move along with the parent. I tried updating the localPosition of child wrt to parent as well as with updating the position. It works fine in the editor, but not on the phone. I see a lag in the movement of the child.
Any suggestions ?
Use [isKinematic][1]. To remove components you use Destroy(). [1]: http://unity3d.com/support/documentation/ScriptReference/Rigidbody-isKinematic.html
– save