CapsuleShape2D collision shape (when height to radius ratio is above 2:1) is some how affecting intersect_ray (that intersects 2 non overlapping StaticBody2D objects) queries on 2 StaticBody2Ds - When the Capsule collides with one of the StaticBody2D objects the intersect_ray seems to ignore one of the StaticBody2D objects even though the ray hits it and it is the closer intersection
sample scene provoided
TO REPRODUCE
- open sample scene
- play the scene
- there is a script on the root node that casts an instersect_ray (represented as a green line) through two non overlapping StaticBody2D objects - it turns the color of the object it hits to red (both objects are reset to white in the _physics_process func)
- a RigidBody2D object with a CapsuleShape2D (with height to radius ratio of above 2:1) drops and lands on one of the StaticBody2D objects - this seems to affect the intersect_ray as it changes which object the intersect_ray now collides with
- if you change RigidBody2D->CollisionShape2D->Shape->Height to 40.0px this bug no longer happens
EXPECTED BEHAVIOUR
Unless I am doing something wrong or missing something - the interaction between the CapsuleShape2D and the StaticBody2D should in this case not have any effect on the intersect_ray result
VERSIONS
- OS: Linux Debian 11
- Godot v4.2.1
- Box2d 0.9.9 and 0.9.11
RayIntersectBugBox2D.zip
