- Home /
Transform Translate Function Overhead
Hi there, I've read a bit in places some insinuation that Transform.Translate is a relatively slow function in regards to performance. Assuming the function is used in the intended way is this true? If all things are equal would a function that does a series of manual rotations be faster then using a combination of Transform.Translate and Rotate to move an object into position? This idea that this would be moving a great number of game objects at once in a game that would not be using a physics engine would also be a consideration. Any other insight to this useful function would be greatly appreciated! Thanks much all!
I am pretty curious to see the source of this information.
Transform.Translate
is slower than setting the position directly (because of the function call itself and the comparison executed inside), but I don't believe it's a "slow function" (especially when you compare it to the FindXXX
functions).
I don't think you will find more efficient ways to change the position (except if you change the position directly, as I said). But before saying such conclusion, use the profiler.