What I’m trying to do: create a function into which I can input a spline component and an offset value and which will output a second spline component whose points have been offset by that value in the X/Y plane.
How I’m trying to do it:
- Copy my input spline to a second spline (output spline)
- Loop through the points on my input spline
- Get the rotations of the spline segments before and after the current spline point using Find Look At Rotation
- Use an RInterp node to find the middle between those two rotations
- Get the right vector of that middle rotation, multiply it by my offset value and add it to the location vector of the current point of the input spline
- Set the current spline point location on the output spline to the resulting vector
The issue: The segment rotation is somehow always at least slightly off. When I test the function using a spline that has only straight segments and right angles, I would expect the segment rotation values to be either 0 or multiples of 90 but they’re always off (usually somewhere in the range of 0.5-15° deviation from the expected value but there’s no discernible pattern to it that I can see). This then, of course, results in a wonky-looking output spline that does not match the course of the input spline.
Alternative solutions: I’ve previously tried using Get Tangent at Spline Point, Get Right Vector at Spline Point and Get Right Vector at Distance along Spline instead of Find Look at Rotation and had similar issues with all of them. I would think the problem was the spline itself except I created it using grid-snap and I can clearly see in the orthographic top view that it’s perfectly straight and right-angled.
Does anyone know where I’m going wrong here? I’m assuming that my entire approach to this issue may well be flawed but I’m not sure what else to do.








