I built a race track using spline and I want to have the positions of all the spline points so that I can calculate the curvature of the road.
I was wondering, is there a node in the blueprint that I can use to get that information and maybe output the positions into a file?
You can use the node “Get Location at Spline Point” or “Get Location and Tangent at Spline Point”. You can request that the information is returned local to the spline, or world coordinates. If you want the data in an array, just use “Get Number of Spline Points” and drop into a For loop (remember to decrement the count returned by 1, as the count returned by the node is relative 1, and you will want relative 0, for the loop), and query the information you want, slap it into an array.
As far as writing the data out to a file, there are a couple of libraries around here, that have nodes for writing to a file.
or you could just use the “Print String” node, to place the data into the output log, and then copy and paste from there.
Hope this helps,
However, I can’t get the positions to be printed on screen or in the log. Do you know why that might be?
Thank you for your help! I’m new to UE4 so apologize beforehand if I’m making some really obvious mistake