- Home /
Question by
eliteg33k · Mar 23, 2014 at 10:29 PM ·
parentingmove an objectpushpushing
Pushing an object with parented origin HELP
So, I am super new at the whole Unity/scripting thing here. At the moment I am working on a script (JS) to push one object away from another object (or point) on mouse down, and then retract on mouse up. So for instance, the two objects will be sphere GameObjects, on mouse down, I would like sphere (B) to move away from sphere (A) to a set distance, and then retract to its original position in reference to sphere (A). One last stab: if this were a Zelda game it would be the hookshot, only the spear wouldn't retract till you let go of the button. I would really appreciate any help anyone can provide as I am a super noob. Thank you
Comment
Your answer
