I need to find out how long a (landscape) spline is that I made in Unreal. Google and the Unreal documentatioj say there is a "Get Spline Length" function, but I cannot figure out how to use it.
Get a reference to the landscape spline. Get the spline component from it, and hook it up to the get length node. It will output the length of the spline in centimeters.
Okay I wanted to make you a series of screenshots about how to do it, and it turns out that this is not possible.Because you can't access the landscape splines in blueprints. They are not accessible, because they don't even appear at the world outliner. It seems like even the class is hidden. The landmass plugin could possibly help here, but I'm not sure. Its also definitely possible to access it in c++, but I guess thats not really an option here.
Yep, that would work. This is how you do it: 1.Make a new blueprint, inherit it from actor... 2.Add a spline component to it. 3. Make a new function (I called it get length) 4. Put the logic in the function 5. Make the function being callable inside the editor, by selecting its input pin, and enabling "call in editor" on the right panel 6. Place the actor in the level and set up the spline 7. You will see that the blueprint has a new button on the details, with the function name on it (get length). If you press the button, the function will be called and you get the spline length
Replies
Googeling how to get a reference only raises more question marks above my head and that´s only the start : (
This is how you do it:
1.Make a new blueprint, inherit it from actor...
2.Add a spline component to it.
3. Make a new function (I called it get length)
4. Put the logic in the function
5. Make the function being callable inside the editor, by selecting its input pin, and enabling "call in editor" on the right panel
6. Place the actor in the level and set up the spline
7. You will see that the blueprint has a new button on the details, with the function name on it (get length). If you press the button, the function will be called and you get the spline length
: )
Man, you´re the man! Thanks : )