What Collider do I use on my floor for a Beat Em Up style game?

Hello!

So I’m making a 2d beat em up. I’ve set up my character to walk and jump, and set up his colliders.

My problem is with the floor asset I have made. What collider do I use to be able to walk around on my floor?

I put in a box collider for now so that my character doesn’t fall straight down, but I want him to have gravity and also move on a surface you see in a game like Streets of Rage? I’m probably being a big noob but I just can’t figure it out!

Thank you for any help you can provide!

Will

Hey Rob,

If I understand what you want to achieve correctly- these types of games usually “fake” gravity- you wouldn’t have a collider for the ground in this case, but rather move your character with transform.position or Transform.Translate.

Regardless you’ll probably want to have a collider on your character as a hitbox (preferably 3d with some width) and move your character on the Z-axis as well as the y when moving up/down.

You may want a collider to stop your character going too high, but I think a simple position check in update would suffice unless your levels get complex enough to warrant anything more.

In general you may want to look up some tutorials on youtube, haven’t tested myself but I’m sure you’re not the first one to attempt this :slight_smile:

Good luck!

Thanks for the reply! I think you’re right and that having the gravity is just not going to work with the flooring. Going to recode my player!