- Home /
jumping through and on a platforms(2d)
So I'm playing around with a 2d game today..I'm still a beginner. Anyway, I want this character to jump on a platform on top of him, but I want the platform to only collide with him when he's on top of it and not when he's jumping through the platform.. An example would be the square backgrounds in this mario game: link text
I can probably think of one way to do it, but it kinda feels like a hack, and I wanted to get other people's opinion on it. Thanks!
Answer by Loius · Nov 13, 2010 at 04:01 AM
In your modeling program, copy the platform mesh. Remove all faces that aren't part of the platform's "standable area". Use this new object as the collision mesh instead of using the platform. Unity performs "backface culling" on collision meshes as well as visible meshes, so it's possible to move through walls that face away from the movement direction.
Your answer
Follow this Question
Related Questions
OnCollisionEnter not called when colliding with clone 0 Answers
My sprite keeps falling through my ground 3 Answers
Dropping down from 2D platforms: Character gets "sprung back" if collision resumes mid-collider 1 Answer
2D Platformer Reload Game On Collision With Sprite 1 Answer
How to make character stop at wall? 1 Answer