Closed AinsRuby closed 10 months ago
What version of Godot are you using? I encountered something similar recently and it was caused by the _grapple_raycast.is_colliding()
returning true but _grapple_raycast.get_collider()
returned null.
Godot 4.1.x supports priorities on physics-processing, and it might be something to do with that. We mess with priorities to prevent latency issues with items in the players hands, but it may cause the raycast to not update. I'll look into this issue shortly.
My problem was caused by trying to get the RayCast3D to return a Node that had just been destroyed. I suspect your problem is that a GridMap does not extend from CollisionObject3D. Could you try the attached script and see if it works for your case?
Hi, I'm attempting to use a Gridmap with collision on the tiles in my scene, due to the ease of use, and the grappling keeps crashing the project due to this line of code.
var target : CollisionObject3D = _grapple_raycast.get_collider()
Wondering if it would be possible to somehow get it working with a gridmap, or if I have to just use normal objects in my scene. Any help would be appreciated!