- Home /
rays hits the boxcollider half way
i want to create a 2 way platform meaning a player can jump on the platform and also can come down from the platform,so initially i have made all the platforms triggered so that the player can pass through it and when the rays from the bottom of the player hit the platform the isTrigger property of the platform becomes true to make the player grounded. but the problem is when the player passes through the platform even if the player is inside the BoxCollider and the ray hits,the trigger becomes false as a result the player is pushed out of the collider.how can i check that when the ray hits, the player should be above the collider.
Could you provide more context please? What info are you getting when using RaycastHit? http://docs.unity3d.com/ScriptReference/RaycastHit.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613180837im_/https://answers.unity.com/themes/thub/images/avi.jpg)