- Home /
Physics performance still effected by proximity even though IgnoreCollisions called and objects never interact
Hi,
I have a model made up of a dynamic moving physics part and the rest static physics parts. The different parts are effectively touching.
I've tried different things, initially i had the dynamic part without a rigidbody, and just used the transform to cause it to move.
I've hit performance issues on an original iPhone and started profiling it.
Someone recommended that you should always use rigidbodies, so I added an RB, made it kinematic and used it to move the object instead. This massively reduced my fixedupdate profiled time, but just moved it and more time onto the physx part.
I just had an idea and tried moving dynamic part away from the static parts and noticed that the framerate is much improved.
I figured that it was perhaps due to the collisions being detected between the static meshes and the dynamic mesh. Though this didn't make too much sense when the dynamic object had NO rigidbody.
Anyway, i've just setup ignore collision calls in the start function of the object's script to make the dynamic part ignore the static parts.
This sadly hasn't helped performance, with or without an RB. Yet again, moving the dynamic object away from the static ones makes the performance decrease.
I'm presuming something is happening with the spatial arrangement of all the meshes together, that seperating them enough allows proper islands to form and stop things being so expensive.
Is there anything else i can do? Its a bit frustrating that physics is so expensive even though i actually don't want these entities interacting with one another, i just want the physics interacting with another dynamic entity which i haven't introduced into the scene at this point.
Thanks for your help
Could you perhaps post a screenshot and label the parts for us? Your setup is hard to visualise.
thanks. If i get no joy i will do. I posted another question following the performance investigation going in a different direction. I need to sort through it all properly to really see what's going off.
Answer by Aubrey-Falconer · Feb 24, 2010 at 03:17 AM
Have you looked into Rigidbody sleeping?
http://unity3d.com/support/documentation/Components/RigidbodySleeping.html
at the point the performance is hit there isn't any rigidbodies in the scene. After adding a single RB to the scene i don't want this to sleep. It's always moving.
Thanks though
Your answer
Follow this Question
Related Questions
performance issue on iphone 1 Answer
[C#] Game runs oddly slow 2 Answers
CPU-GPU game loop planification 0 Answers
iPhone 4S performance issues 6 Answers
Why my App size increases four times after playing on Ios 0 Answers