[SOLVED] ]Curve projected on surface - set curve tilt based on surface normal?

Hi,

using the Raycast Node I project a curve onto a surface. The curve is 2D and Z-UP, floating above the ground. Now i want to control the curve tilt in a way that it takes the different ground angles into account. The Raycast Node proveides the surface angles. But how would I combine that with the curve tangent to get an angle? Just tried with a dot product and hoped for the best. But it is more complicated.

It seems like a basic problem, but couldn’t find any ressource on it.

Thank you

2 Likes

SOLVED:

I had to use “Set Postion” after the “Set Curve Tilt” Node, since the Set Postion messes up the Normals of the Curve. And instead of calculating the dot product of the Hit Normal and the Curve Tangent, i had to use the Hit Normal + the Normal of the Curve.

2 Likes

Welcome :tada:,
very nice that you answered your own question and so added some value to the community :wink:

1 Like