Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Technolon |
I’m making an RTS but I would like the player character to be restricted to a circle in which they can move around freely. I need the answer to be compatible with multiplayer and move_and_slide(). Thank you in advance. I am using a kinematicBody2D.
I need the answer to be compatible with multiplayer […]
What does that even mean? Local or online multiplayer? Can the circle of another player and yours overlap? What is supposed to happen then?
I need the answer to be compatible with […]
move_and_slide
Again: what do you mean? Why should it not be compatible with move_and_slide
? In the end all you have to do it calculate the border coordinates of a circle around the center and check before each move of the player, if that move would move them outside of these coordinates - in which case you wouldn’t perform the movement.
njamster | 2020-07-16 17:55