I am working on a gun and the bullet follows the raycast result position. But it does not provide a raycast result if the ray does not hit anything. I need to figure out how to get the position of where the ray would have stopped with the Origin and Direction that I provided the ray with.
origin + direction * maximum distance
I might be wrong, but the goal is to multiply the direction times whatever the maximum distance is and have it emanate from the origin.
If you want to have your target position understand what it’s touching then use raycastresult.Instance or print your ray and then .Instance to find the part.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.