Performance Question on Kinematic Rigidbodies

Hello everyone, I’ve been doing some on device testing (in my case an iPhone 4) using the free Unity profiler and default Unity physics settings, and noticed that in a particular scene physx is taking around 40-60ms to render about 30-40 objects that are kinematic rigidbodies controlled through scripts (use no real physics).

More details:
-The scene in question is a “frogger” type setup, where rocks move along a straight path and bob up and down (all according to script), and when a player stands on them, they begin to sink.

Each rock has a mesh collider and a mesh trigger.

The primary script methods used to move these rocks are Vector3.Slerp, Vector3.MoveTowards, and Vector3.Distance.

I have been reading around and apparently for the number of objects on screen, this is a very significant amount of time spend on physx. So, I was wondering what the best to way go about cleaning this up is? Changing physics settings? Different object setup? Different script methods? Any help is appreciated.

I should also mention that at this point, for convenience these rocks are instantiated and destroyed (not recycled) and the garbage collector tops out at around 5.

Mesh colliders are very expensive for performance. So, this where I would start. Try to approximate the rock shape with another collider, e.g. capsule.

Also, you should really use some pooling method to recycle the rocks, because the GC kicking in at any point in the game, could make the game freeze for a couple of seconds or so.