Help with collision
Please help me fix the collision on this project. It mostly works fine, but if you hold left against the right side (and vice versa) of the black rectangle, you can't go up or down.
Controls are the arrow keys.

It works fine, whats the problem?

I feel like thats the same with most games, but I will try and help.
This is my first time actually helping btw

You need to complete the whole forward>bounce cycle, for a given key, at once. Otherwise, you don't know which move causes collision and should be undone and the result depends on the order of conditionals.
So you can remove entirely the "tile" clones loop and, for the "player", use
untitled script pic - 2022-02-02T205234.151

The reason I have the clones handle the collision is because there are going to be many kinds of tiles, and I've only implemented walls as of now.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.