Collision with walls #1164
Unanswered
stingerhorse
asked this question in
Q&A
Replies: 1 comment 21 replies
-
Have a look at this example. I think it does something similar to what you are trying to achieve. Let me know if it works. |
Beta Was this translation helpful? Give feedback.
21 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there!
I'm currently working on a roguelike game but I can't get any further with the player colliding with walls. I've created the wall as an entity and two variables which have always the value of the current x and y position of the player. If the player collides with the wall, he would be set back to his previous coordinates. The collision gets detected, but I wasn't able to figure out how to give the coordinates to a variable. I think I have to proceed in a completely different way.
Thanks for any advice!
Beta Was this translation helpful? Give feedback.
All reactions