Spinker
(Spinker)
May 21, 2024, 3:31pm
1
Hi!
I am creating a procedural rail using splines. The idea is: as soon as I place the blueprint on the level, the spline automatically snaps to the landscape and align itself correctly.
As you can see on the pic, the rail are not rotation-aligned to the landscape.
So far it was easy to snap the spline locations to the landscape, but does anyone know how to align the point rotation too?
I mean, what are the maths to align the spline point to the ground?
Spinker
(Spinker)
May 21, 2024, 4:08pm
2
Found out! Many thanks to a friend of mine (hi Pierre!) who helped me out!
In case anyone ever needs this, please find the code here Align spline location and rotation to landscape posted by anonymous | blueprintUE | PasteBin For Unreal Engine
(note that I add +8 to the locations of my spline points, this is not required and you can remove it if needed)
1 Like
system
(system)
Closed
June 20, 2024, 4:09pm
3
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.