Download

Heavy performance drop with splines.

Hey friends hope you are good today.

So i have a performance problem with the following.

I have 3 Splines in the world.
In my vehicle blueprint i use the "find input key closest to world location"node.

I use this node 3 times because i have 3 splines in the world as i said.
Now i have seen that these 3 nodes are heavy on performance.
Without these nodes i can reach 120 FPS with ease, but as soon as i use them, my FPS tanking down to round about 90 FPS.

Is this node really that heavy or is something wrong with my spline?
My Spline is kinda long and has over 200 splinepoints.

As always, thanks and have a great day.

How are you calling it, on tick? Can you show a bit of BP?

At Begin Play i make a reference from the spline.
Then i hook up the reference spline to the “find input key closest to world location” node.
With that node i calculate the normal from the 3 spline points in world space. Then i use " set world rotation" with tick. It needs to be tick.

No matter what, as soon as i delete or unhook this node the performance is much better.

Edit:
I also should note that i have this same vehicle 8 times in the scene, for testing purpose.
I plan to have 20 vehicles at the same time on the track with that blueprint, thats why its kinda important.
PerformanceKiller.jpg

OK, what about if you use ‘find location closest to world location’, is that possible?