#RayCast2D returns collision_normal of (0, 1) on a flat horizontal surface with a ricing next to it.

1 messages · Page 1 of 1 (latest)

languid magnet
#

In the third screenshot you can see collision polygon of this surface. Everything is snapped and straight. But somehow the left RayCast and the middle Raycast returns collision_normal with value of (0, 1), or -PI angle (1st screenshot). I understand that this may be fixed by changing the polygon's left flat ledge to be more wider (as you can see by yellow line in the 2nd screenshot), but this is not ideal solution. This behavior is not the same when the collision polygon is mirrored (the 4th screenshot). in fact, rays return the correct collision_normal of (0, -1) or 0 angle.

languid magnet
#

should i move to the web forum?

strong vale
#

So you're saying the problem is that the normal sometimes points down, instead of up?

#

And this is from RayCast2D.get_collision_normal()?