- Home /
Performance of transform.localposition vs transform.position
Hi,
I am currently working on a tank track system which changes position of each pad by using transform.localPosition, it works fine on my computer but I will sell it through assest store, so I try to optimize it for the sake of the future customers.
The problems is the numbers of access to transforms is huge, e.g 320 pads for a tank each frame, and I don't know is there any different in using position/ rotation vs localPosition/ localRotation? I will do a benchmark, but any insight will surely help. Here are my questions:
1/ The more sub-level the localPosition/localRotation is, the slower the code runs, because the more matrices it needs to multiply to returns the world position/rotation, right?
2/ What is the best way to change position/rotation of a large number of objects?
Thanks
See BenProuction's answer here, on the implementation of these you're asking.
Your answer
Follow this Question
Related Questions
How can I defer the recalculation of child transforms whilst modifying the parent transform? 0 Answers
instant move an object to a position + offset value 1 Answer
transform.position on basis of rotation 0 Answers
hit.transform.position + hit.normal; makes objects float 1 Answer
Best way to find which two transforms in a list of transforms a point lies between. 0 Answers