- Home /
Weird 2d platform problem
Im experiencing a very odd problem, that i don't if it can fixed or if its a bug.
Let me try to explain. I have to object as platforms, and between those to i have a third platform with the Platform effector 2d component. This component does that the platform it is attached to, work as a one-way pass through. So i can go trough from below, but not from top. Just like in Mario! SO thats the setup. The problem is i have a script which tells me if my playing is grounded, but it suddenly acts weird when i pass through the platform with the on way pass through.
AS you can see on the picture, that i need to hit at least on of the black platforms and the grey one, before grounded is true. So its only true when i stand on both? All the platforms have the tag "grounded"
and i have this simple script telling me if you are grounded. (attached to the player)
void OnCollisionEnter2D(Collision2D coll) {
if(coll.gameObject.tag == "ground") {
touchingGround = true;
rotationleft = 360;
}
}
void OnCollisionExit2D(Collision2D coll) {
if (coll.gameObject.tag == "ground") {
touchingGround = false;
}
}
}
Your answer
Follow this Question
Related Questions
Platform Effector 2D (one-way) not working 0 Answers
2D Animation does not start 1 Answer
2D Platformer Bug 0 Answers
Problem with my button 2 Answers
Animation Coordinates Issue 0 Answers