So basically I want to Instantiate a cube that extrude/scale itself. but when He hits something he stops. Image url to show what I had in mind http://dl.dropbox.com/u/35514683/Untitled-2.html So what is the best way/method to handle this? Because now I scale it and use OnTriggerEnter, but it stops after the wall(for example) And sometimes it scales it to in the opposite(negative) direction then I want.
Code (csharp): var stop = false; function Update() { if(!stop) { //scale.... } } function OnCollisionEnter() { stop = true; }
What concerns me greatly about this is that your doing a mathematical scale. I am not sure that the collision will register consistently.