- Home /
Please. Help me out :(
hi there, I am an absolute beginner to unity and I am having some problem. I am making a game like mario just for learning purpose and my problem is whenever my character jump up he must ignore the object which is just above him but whenever he comes down he must have to land on that ignored object. As posted image u can see there are some brown objects according to mario game when mario stays on one brown object and when jump up he ignores brown object which is just above him and lands on that when comes down. I hope you are understanding what I am saying. sorry for bad english.][1] Plz help me out, provide a script for that. thanks in advance :)
Answer by Socapex · Jun 21, 2015 at 12:51 PM
Hi there. I had this problem way back on another engine :) What I did was, I checked if I was moving upwards by keeping my last position, and finding the delta (lastYPosition - transform.position.y). If this is negative, you are moving upwards! Then you can disable the collisions with those specific colliders when he is jumping.
Hope this helps!
Your answer
![](https://koobas.hobune.stream/wayback/20220613201213im_/https://answers.unity.com/themes/thub/images/avi.jpg)