D
D
Dmitry2013-12-05 19:43:06
2D
Dmitry, 2013-12-05 19:43:06

What's the best way to implement 2D stairs and crates in a game, similar to classics like Dangerous Dave 2?

I've been scratching my head, nothing comes to mind. What would be a better way to implement 2D stairs and crates in the game, similar to classics like Dangerous Dave 2?
Explanation: these blocks in the game are transparent on one side for movement, but when falling under the influence of gravity, we can stop on them.
Example 1. We
stand under the box
0a2de21aa345ac4008cba2bbea589386.png
We jump - and find ourselves on the box
86d2a72cbbb454bd36dbce3e998dfde6.pngcd5552fcf270fa1280c175c2c1fdb1aa.png
Example 2. We
stand under the stairs:
cec16351997757919f15737d4153d60b.png
And we can jump to any step of the stairs, from it - to any next, and so on.
d40cd56499bd4013349ab30bd6ac8f3f.png033119f5bd1bf1398a9b36453f0e9247.png
But at the same time, we can hold down + jump and jump to the platform below.
I can't figure out how to bring this together with the Unity physics engine, because if it registers a collision, it won't let you move on.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Khlopianik, 2013-12-06
@Newbilius

Have a look here:
answers.unity3d.com/questions/50518/passable-one-s...
Also might be useful:
answers.unity3d.com/questions/362021/eficient-one-...
forum.unity3d.com/threads/ 71790-layers-collision-a... (a-question)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question