That’s the code I’ve been writing over and over again in recent days.
Basically is what makes the game go directly to the debug room I use to check collisions.
I hate collisions.
I have spent the last week or so trying to fix a bug in the first version of “Dimension of Cubes”, by which you could get stuck if a cube materialized while you would jump.
But, after hours of calculations and desperate searches on Google, I found the solution.
Now, if a cube is materialized in your position, you are automatically transported to the top of the cube It is a way to avoid bugs and a skilled player can use it to fast forward through the levels. And for his life in a fall, if you are lucky enough to have a cube nearby when you fall.
And it worked right the first time!