Geometry Nodes Spline in Raycast

Hello everyone

I am shooting raycasts from points inside a mesh to the surface.
You get the Hit-Position and you have the source position.
Is there a way to create a spline (curve line) between these two points for every raycast that was done? (The task seems easy, but I could not input my 2 positions into the curve line)

Greetings, Mech

Yes because the curve line doesn’t take fields as input…

The solution is to instance curves at the source position, then realize instances ( so you can modify the curves) and finally set the position of each curve’s end point, using the data retrieved by the ray cast.

Maybe another solution could be to extrude each vertex at the start position, then set the endpoint to where the raycast hit, and finally convert that to curve… sky is the limit !

4 Likes