#how to get node from raycast
8 messages · Page 1 of 1 (latest)
i have the feeling that i'm missing something. once you have the node you should be able to call anything you want on it.
i could only assume what OP means is that the raycast likely gives a reference to the collisionbody it interacted with and OP wants a way to get from there to an arbitrary parent node that actually houses the script one would want to interact with?
Yeah I'm using the physics raycast in script and I want to interact with the node that it hits in script
It gives a collision id in a dictionary but I am unsure how to use that to edit the collision-er
If the script you are trying to reference is on the highest level in your packedscene instance, couldn't you use get_owner()?
this is what I have thus far for the ray, I am wondering how to use this function to interact with whatever the ray hits, e.g. que_freeing it or running a function in it