Hello! I wonder what is the life cycle of ray_cast. When be ray_cast deleted?
I use physics.ray_cast, get “ray_cast_response” or “ray_cast_missed”. What if i create one more ray_cast with the same name ?
Thanks!
A ray cast is a one-time check, which happens during the next physics update. You will get a “ray_cast_response” or “ray_cast_missed” message, and that is it. There is nothing to delete. If you need to identify multiple ray casts used at the same time, use the “request_id
” argument to physics.ray_cast—give each ray cast a specific number to identify it with when you get the response message.
6 Likes