Moving up and down an object


I want a balloon to move up and after a specific distance come down.
It has physics engine behavior.
It goes up but after the distance has passed I can’t stop it and move it down.
You can see the code below:

What should I do to bring it down?


Higher the ballon, smaller the Y.

Basically: Y -100 is greater than Y +100.

So, you should try the < symbol.

I changed it to:

But the problem still exists!

Can you check if there is a “Stop the object” specifically for the physics behavior? Also, try changing the action just to make sure the conditiom is returning true.

No, there is just one stop the object.

The apply force is a physics action. The stop force is a non-physics action. The easiest way to tell if actions are for the same behaviour is to look at their symbols; in this case, they are different.

You can stop the balloon bomb with physics 2 ways:

  1. Put a hidden static physics object above the balloon bomb where it should stop.
  2. Use the balloon bomb’s action Linear velocity Y and set the speed to 0:

You should also have a condition on action that sets the physics force. Constantly applying a force and then changing the velocity may produce unwanted results.

It Works. But then I can’t move the balloon down.

I appreciate your help, but I think using a boolean variable is a better and simpler method.
At first, I did not think that this program would do this. But like it can.