How to get collider from its ID or RID

Godot Version

4.7.1

Question

that’s it

It’s not possible to get the object from its RID but if you have an object id then you can use @GlobalScope.instance_from_id()

It is possible to get a collision object from its RID through the physics server generally, see for example area_get_object_instance_id and then use that with instance_from_id

But your question is very vague

I am using a ShapeCast2D. In the collision result property, it says it returns an array containing a dictionary of values for each collider. According to the PhysicsDirectSpaceState2D.get_rest_info() function’s documentation, it contains the collider’s ID and RID but not the collider itself I think.

The ID you use with instance_from_id