Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | MomoVR |
I’m trying to cast some rays a bunch of times using DirectSpaceState.intersect_ray()
, here i get the hit point by doing hit["position"]
where hit
is the result of the raycast.
For some reason the hit points are not accurate and appear at seemingly random positions.
However if i put a delay in between by doing yield(get_tree(), "physics_frame")
This makes everything work, but it’s too slow now because it waits every frame.
How are the rays being sent out? Individually? In a for
loop? Sharing some more of the code would shine a light on the problem.
Ertain | 2022-07-01 23:35