Description
Godot version
4.2.dev [f7bc653]
System information
Windows 11 (10.0.22621)
Issue description
#71233 introduced a new field to RayResult
called face_index
, as seen here:
godot/servers/physics_server_3d.h
Lines 151 to 159 in f7bc653
... but unfortunately the binding for RayResult
(aliased as PhysicsServer3DExtensionRayResult
) wasn't updated, as seen here:
godot/servers/register_server_types.cpp
Line 160 in f7bc653
... which leads to extension_api.json
being emitted with a different struct layout for PhysicsServer3DExtensionRayResult
compared to Godot's RayResult
.
Since PhysicsDirectSpaceState3DExtension::_intersect_ray
directly manipulates a pointer to a RayResult
, you end up corrupting it when writing to anything past the normal
field from a GDExtension, due to mismatching binary layouts.
Steps to reproduce
- Download the MRP
- Run the project's main scene with Godot 4.1.1
- Note how the output mentions a non-null collider
- Run the project's main scene with Godot 4.2 (after a56e960)
- Note how the output mentions a null collider, as well as other errors (due to the instance ID being corrupted)
Activity