My Line gets too much stretched

Ok So I have a problem I use a shape painter and my 2 players are connected to each other with a line drawn between them how can I make that line not stretch more than 100 pixels and if it reaches the limit the currently selected player cannot move any further Pls help I am in a hurry

The easiest way would be to add a Rope Joint

To add a rope joint I had to add physics2.0 and that doesn’t work with my character if I remove platformer character how do I setup physics 2.0 for it

my physics 2.0 characters are just dancing

So you’d like them to just not move at all if they’re too far apart? You could store the current position into variables, move the character based on input, and if the new distance between the two objects is now > 100, restore to the position stored in the variables.

Sounds nice but then I will not have to use that rope joint please tell ?

Correct, you’ll have to remove the rope physics.

I set up the part but now my player stops once he reaches 71 distance

there is no way I can set an else for it

in the game start second condition I set

Ok I tried to restore it but still not work

Ok, so you’re assigning the positions to variables. But where are you restoring them, and under what condition(s)?

They were not being restore so I made them with -1 you can see the last image last grp last condition that’s it

nvm @MrMen

I figured out the way it was by restore only just plenty conditions needed thanks for help you are great

1 Like