- Home /
making perpetual movement
I am making a simple game involving a ball going down a half pipe. I want the ball to have perpetual movement so that it goes up and down without ever stopping. I have used the Constant Force component, and put it to -10 on the x axis (world). But I need the force to change to +10 once it's done going up the pipe. What would be the best way to achieve this?
               Comment
              
 
               
              Answer by Jason_DB · Feb 26, 2010 at 09:10 PM
You could put a trigger collider at the point where the velocity has to change and have it call a function on the ball which changes its force.
function OnTriggerEnter (ball : Collider) {
    ball.gameObject.SendMessage("SwitchForce");
}
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
               
 
			 
                