A bit of help with 2D/2.5D collisions? (top down, isometric)

( Sorry if this is in the wrong section… )

Hey there! After practicing my blueprint and c++ skills for some time, I’ve decided to work on a dungeon crawler style game. I really like the style of the game “Crawl”, and so some of my content will resemble it. What I can’t, for the love of me, figure out is how to handle the collisions.

The game will be essentially 2.5D (well not by definition, but it makes it easy to understand since it’s using both 2D and 3D elements). This is because the actors and artwork will be mostly composed of Paper2D sprites, yet the camera will be in perspective view and the floor will essentially be 3D.

Some Crawl gameplay to illustrate what I mean:

Anyhow, what I need the most help with is the 2D collisions. I don’t have much of an idea or background in how to approach them. A typical 2D platformer has most actors/objects placed in the same Y axis, thus the default Paper2D collisions work just fine, as they are essentially a flat plane. However, if you make a game like the one illustrated above, you also move in the Y axis. Yet when the player slashes/attacks, you can clearly see that the enemy is attacked even though the player and the enemy are not located in the same Y coordinate, thus making the collisions be essentially 3D. Not only that, but they also seem to be very accurate.

How would I go about achieving this in unreal (hopefully with blueprints)?

I’m guessing a way (rather terrible way) to do it would be to have a bunch of different sized box colliders placed around the player, and let’s say the player does his first slash, when the “first box” collider overlaps, in the event you could make it branch out and check if a bool variable named “first slash” that indicates the first slash in the combo is true/happening, and then do whatever your hurt event is or whatnot. Then do the same for the other parts of the combos, etc. Obviously in a more organized manner, but you get me (I hope). The issue with this (apart from the ugliness and terrible organization) is that if you have more than one sword with different animations for the combos it would be very tedious to have that many box colliders. E.G: You have 5 swords, with 3 different slashes each. 15 total box colliders.

I also guess that as an alternative to those box colliders you could use traces, but it’s kinda the same thing.

I am pretty noobish, so forgive me in advance for the question ^.^’ and while I’m apologizing, I’ll also apologize for the long question and for any confusion, English isn’t my first language :slight_smile:

Thank you so much!!

I am essentially on the same problem! I was as well curious as to achieve this feel with collision. Something I was looking at was Dustforce which uses a Circle Trace around the character to register attacks, so anything within that circle is registered as an “enemy” and is essentially attacked when the attack animation is played. . I know its a 2d side scroller but if you visualize the hit sphere as a quarter, and place your 2d character in a 3d world in the center of that quarter and lay it on its side on your plane, it should give the same effect. (this is my theory for now.)

another thing I was looking at was this…
this helped me visualize how an enemy can create some flat objects in that flat plane and use it to hurt the player. I don’t see why something like this can’t be reversed and given to the player in a way. but figuring out implementation is where I’m currently at.

These are my two theories, maybe we can figure this out together :D!

Hello! Thanks for your reply, it’s reassuring to know I’m not the only person trying to figure this out XP

That was actually one of the methods I thought of doing, the sphere thing. I thought of changing the size of the sphere collision based on what weapon and/or combo was equipped by storing this info inside an enumerator or something of the like.

And the second method seems interesting, so I’ll have to look a bit into that.