|
Hi Im making a Cog that has to rotate. Empty GameObject with these children: - 1 spehere+collider - 3 boxes with colliders Im losing 10 fps on iPhone when I have 2 of these rotation in update. I also tried adding rigidbodies but performance didn't come back to max. Any suggestions or how can I rotate objects with colliders? //// Code //// private var thisTransform : Transform; var zRotate : float = 1; function Awake () { thisTransform = transform; } function Update () {
}
(comments are locked)
|
|
As a general rule, If you have GameObjects with colliders, and you intend to move them, always add a kinematic Rigidbody. Colliders without Rigidbodies will go into an accelerated AABB Tree in PhysX for fast collision lookups, but this tree has to be rebuilt every time a collider is moved, which will kill your frame rate. but should I add Rigidbody to each child object which has a Collider or only to the mother (Empty gameobject) ? Or both?
Dec 14 '10 at 10:14 AM
kunddizzle
Either will work. If all the only the parent object will ever be moved or rotated, it is advisable to only have the rigidbody on that one, there should be no need to have one for each child in that case.
Dec 14 '10 at 01:38 PM
jonas echterhoff ♦♦
(comments are locked)
|
|
but should I add a Rigidbody to each child object (with colliders) or only to the mother (Empty gameobject) ? Or both?
(comments are locked)
|
