You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 17, 2023. It is now read-only.
Right now when sprites collide at all, it halts the movement. This isn't ideal, it'd be better to be able to "slide" - if you are moving diagonally and hit another sprite, you should slide along the sprite in the direction that the sprite isn't in.
For example if you're moving down and right and you bump into a sprite on your right, you should continue sliding down.
This might be a bit tricky because sprites can also move. We'll probably want to apply the X and Y moves separately:
for each sprite:
move it in the X direction
check for collisions with walls
check for collisions with other sprites
revert X for any that hit things
repeat for Y
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Right now when sprites collide at all, it halts the movement. This isn't ideal, it'd be better to be able to "slide" - if you are moving diagonally and hit another sprite, you should slide along the sprite in the direction that the sprite isn't in.
For example if you're moving down and right and you bump into a sprite on your right, you should continue sliding down.
This might be a bit tricky because sprites can also move. We'll probably want to apply the X and Y moves separately:
The text was updated successfully, but these errors were encountered: