Im making a 1-1 replica of mario bros but i need to find a way to make the sprites not bounce up and down, but side to side.
1 Like
If you give your sprites only a horizontal velocity, they should only bounce side to side I think. Do you have an example for what you mean exactly?
2 Likes
Well i need the sprite to also have ay velocity because the enemy needs gravity
1 Like
Ah I see! Well there are two solutions to this:
Either make the enemies not fall off their platforms (make them go back and forth like this game)
Or
You can have invisible walls around your tilemap and have a check if they’re hitting a wall-left or wall-right instead of bounce on wall (Like this game – The downside of this is they’ll be turning before reaching the actual edge).
1 Like
OK thanks! this helped alot!
2 Likes