In my game there is an obj_maze:
The width of the maze is 10 pixels in all its extension.
In the game, the goal is to get the obj_Cube through the maze.
obj_Cube:
The obj_Cube is wider than the maze on purpose, to get a pixel exceeding all sides as the object runs.
There are also obj_Tubes. They are responsible for defining what position the obj_Cube should go in the intersections that exist in the maze.
The obj_Tubes also have an extra pixel to stand out from the maze.
I made this whole explanation, to make it easier to understand my problem.
When obj_Cube collides with obj_TubeX, its new direction will be defined by what you can imagine.
It turns out that this is done wrongly, detection happens early in the collision, as expected.
Stirring in the bounding box, I was able to correct the problem.
By doing this I get the obj_Cube go right or left correctly.
Now and when the obj_Cube does not come from below, but from the right or from the left? This collision certainly did not happen properly.
Here is an example of the obj_Cube from the right, with the bounding box I used earlier:
The collision is neither detected.
Believe me, I've tested numerous bounding box possibilities for both obj_TubeX and obj_Cube, so that all cases are resolved, but it's physically impossible.
(At least the way I'm trying)...
I also thought about having three equal sprites from each tube with different bounding boxes, but that would be extremely harder and coarser, making my game weigh a lot more.
Sorry for the bad English, I'm not English speaker. I had to use google translator to translate everything.
Thank you in advance!!!