You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation states that RayCast.get_collider.shape() returns the Shape ID of the CollisionShape that the RayCast intersected. However, it doesn't seem to return the correct number.
var target = $RayCast.get_collider()
var shape = target.shape_owner_get_owner(target.shape_find_owner($RayCast.get_collider_shape()))
The above code in my project causes this error:
E 0:00:06.707 shape_find_owner: Index p_shape_index = 522 is out of bounds (total_subshapes = 1).
<C++ Source> scene/3d/collision_object.cpp:328 @ shape_find_owner()
Bullet.gd:54 @ _process()
After asking for help in the Godot Discord Server, a Godot dev suggested that get_collider_shape() was returning the Shape RID instead. They suggested I check by using Godot Physics Engine, which after testing caused no errors
The text was updated successfully, but these errors were encountered:
which I think returns a shape index, but I didn't check.
pouleyKetchoupp
changed the title
RayCast.get_collider_shape() doesn't actually return Shape ID
[Bullet] RayCast.get_collider_shape() doesn't actually return Shape ID
Jan 15, 2021
@pouleyKetchoupp I want to report that there's still an issue in Godot 3.3.3 with spaceState.IntersectRay's way of raycasting, the "shape" key doesn't return the correct id with Bullet (the raycast node counterpart seems to not have this problem though).
@JakSparro98 Indeed, the issue actually still exists for raycasts. It was reported again in #47989 with a minimal test project so I'll leave that one open.
Godot_v3.2-stable_win64
Windows 10 version 1809
The documentation states that RayCast.get_collider.shape() returns the Shape ID of the CollisionShape that the RayCast intersected. However, it doesn't seem to return the correct number.
var target = $RayCast.get_collider()
var shape = target.shape_owner_get_owner(target.shape_find_owner($RayCast.get_collider_shape()))
The above code in my project causes this error:
E 0:00:06.707 shape_find_owner: Index p_shape_index = 522 is out of bounds (total_subshapes = 1).
<C++ Source> scene/3d/collision_object.cpp:328 @ shape_find_owner()
Bullet.gd:54 @ _process()
After asking for help in the Godot Discord Server, a Godot dev suggested that get_collider_shape() was returning the Shape RID instead. They suggested I check by using Godot Physics Engine, which after testing caused no errors
The text was updated successfully, but these errors were encountered: