[performanсe] SetTransform vs SetLoc+SetRot
Hey, i would like to hear your opinions, on which approach will yield better performance result
case 1: Set Transform
in both cases, the Scale is not affecting anything, and you can assume the operation happens in a big loop or tick event, so every bit of performance is important.
Thank you in advance :)
SetTransform() is faster in blueprints.
I have run for loops of 8000 iterations per tick:
The First case clearly won. The difference is nearly 10% more performance when using GetTransform, rather than GetLoc + GetRot, even though it contains one more vector in it (scale)
I did not test it in C++, but i think it will be the opposite there. i would love to hear if someone does it.
Why don´t you simply messure it? But my gut feeling tells me Transform will be faster (and no I won´t look at source, or messure it to figure it out for you ;P)
answered Sep 29 '17 at 06:58 PM
I took a quick look in to the sources it seems like setting the transform is much faster.
Transform just copies and sets the values.
Follow this question
Once you sign in you will be able to subscribe for any updates here