Does physics not work if objects move on their own?

All the objects here have high bounce, low friction, but when they encounter each other, no bouncing happens. They are not, however, being moved by the user–the movement is first recorded and then they move on their own. Is this why?

CleanShot 2022-07-16 at 10.33.39

3 Likes

Haven’t looked at the code, but I’m guessing it’s because the position is constantly being set by the Ease behavior, so if they were to be moved off course they’d instantly snap back

5 Likes

CodeAlpaca is correct; if you’re using position, the players will go into that coordinates and then physics will move them apart.

If you want them to push each other (which also means they want exactly get to their destination), you should try using velocity and a timer to get that distance they need to run.

5 Likes

Okay now my players are bouncing around like billiard balls :laughing:

Is there an example of how to set up “go a bit in the direction of this location” code with velocity? (Have searched the forums)

1 Like

Is this what you’re looking for?

1 Like

Ahh yes, should have thought of thinking of it this way, thank you again–also at least the code I was trying to figure out on my own wasn’t too far off, that’s encouraging :slight_smile:

1 Like