kuligs2 This is the whole function right now, I'm running it in _process for testing. I wrote the error in the code but here's the full thing:
E 0:00:00:949 player.gd:48 @ _process(): Condition "p_point_query.is_null()" is true. Returning: Array()
<C++ Source> servers/physics_server_2d.cpp:361 @ _intersect_point()
<Stack Trace> player.gd:48 @ _process()
https://github.com/godotengine/godot/blob/f62fdbde15035c5576dad93e586201f4d41ef0cb/servers/physics_server_2d.cpp#L361
Line 48 is the var intersections = direct_space.intersect_point(query). When I make query a PhysicsPointQueryParameters2D instead it works, so the problem might be with the shape? But I've tried assigning it in multiple ways (query.shape_rid = shape, query.set_shape(shape), using an existing shape, creating a new shape - see edited code above) and it didn't help.
If I'm looking at the source code right it's failing because the parameters are null? but the query object I'm passing is clearly not null.