- Home /
Trigger not detecting collision with Platform Effector 2D
My character uses a Box Collider 2D (Trigger) to check if it's touching the ground. The code (called every Update() ) to check that is:
grounded = groundCheck.GetComponent<Collider2D>().IsTouchingLayers(groundLayer);
Where groundCheck is a child GameObject with the Trigger.
When the character walks through an GameObject (within the groundLayer layer), it looks like it's Trigger doesn't detect any collision.
The transparent-ish rectangle contains a Platform Effector 2D
If the characters passes through the platform from right to left, however, it's Trigger detects the collision.
Some movement tests I did:
Run from left to right:
no detection
Run from right to left :
detects collision
Run from left and go back in the middle of the platform:
no detection (neither going or coming back)
Run from right to left and go back in the middle of the platform:
detects going, no detection coming back
Does anyone knows if there's something about Platform Effector 2Ds that I've missed?
Any help is appreciated.
Your answer
![](https://koobas.hobune.stream/wayback/20220612133942im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Side Collision on "One Way" platform? 2 Answers
One-way platform's side causes collision with Platform Effector 1 Answer
Is there a way to make the camera collide with specific objects - 2D 1 Answer
How to move multiple dynamic gameobjects with one moving platform which is controlled by the player 0 Answers
Physics2D.IgnoreCollision not working! 0 Answers