[SOLVED] How to make wall collision for 3 axis instead of 2?
Posted: Wed Jun 12, 2024 8:49 am
Hi. I'm a newbie in LOVE2D, and I recently decided to make a custom 3d raycaster template for my future games. Everything in there works relatively fine, except for the fact I can't figure out how to make proper collision on the Z-axis.
For context, each block in my map has these coordinate values: X/Y/Z and W/H/D (d for depth). The Z value is the bottom of the block, the D value is its length until the very top. Finding out how to do proper wall collision for the 2 axis was not easy, but doable for me. However I didn't find a single piece of info on how to do it for 3 axis instead of 2. I'd be delighted and forever grateful if someone smart figured out how to do that in the LOVE2D nature.
I've attached the .love file below.
For context, each block in my map has these coordinate values: X/Y/Z and W/H/D (d for depth). The Z value is the bottom of the block, the D value is its length until the very top. Finding out how to do proper wall collision for the 2 axis was not easy, but doable for me. However I didn't find a single piece of info on how to do it for 3 axis instead of 2. I'd be delighted and forever grateful if someone smart figured out how to do that in the LOVE2D nature.
I've attached the .love file below.