- Home /
Help needed making fake 3D collision in a beat em up style 2D project
Hello! Me and a friend of mine are working on a castle crashers/scott pilgrim style beat em up game. These games have a sort of "fake" 3d collision, where player characters can move and jump on geometry properly, but still have flat 2D sprite art.
We are currently stuck trying to figure out how to achieve this. The way we have it currently is that there is a box collider around the player characters feet, and an edge collider acting as the level collision. The problem with this is that this makes it impossible to do things like jump onto a higher platform. We want to know if there is any way of "drawing" where the player can and cannot walk on, as seen in the attached image.
Here is the script for our player movement: https://pastebin.com/zqE99rrk
Any help will be much appreciated, thank you!
not the entire level, but the background in the screenshots i posted is
You could add tags on the walkable parts using GameObject.CompareTag()
Answer by wfreeman480 · Jan 03 at 03:24 AM
I have an idea. You could keep the box collider but when you press space bar it temporarily disabled's that specific collider.
if(spaceBarPressed)
}
box collider set to disabled
player jumps
}
Your answer
Follow this Question
Related Questions
Anyway to change the colour of collider outline in the editor? 1 Answer
How to optimize a lot of colliders? 1 Answer
CircleCollider2D vs PolygonCollider2D: which collision solving is less expensive? 1 Answer
2D collision won't work? 2 Answers
Is it possible to detect collisions between 2d and 3d objects? 2 Answers