Multiple coins rotation using script eats draw calls

Hi,

I am using following code to rotate my coins

void FixedUpdate(){
	transform.Rotate(0, 200 * Time.deltaTime, 0, Space.World);
}

the thing is , it does rotate on one axis but it eats lot of draw calls .I checked it on profiler, it took around 100 draw calls…

What is the solution to it?

what you could. try is if your coins are models not simple cylinders try compress the mesh just click on the model there will be an option called mesh compression just set it to high.or add a rigid body to it.cause moving non rigid body’s is quite expensive as far as I 've read.hope I’ve helped a bit.

Don’t know how about draw calls, but at first Time.deltaTime is for Update() and Time.fixedDeltaTime is for FixedUpdate(). Second - Time.fixedDeltaTime - is a constant, so you can create global variable in the top of a script somthing like this:

Quaternion deltaRot = Quaternion.Euler(0f, 200f * Time.fixedDeltaTime, 0f);

Then in FixedUpdate() just use this in that way:

transform.rotation *= deltaRot;

May be this will help)

p.s. use float numbers with “f”… “0f” instead of “0” etc.; and sorry for my english

Have you tried banging just that line of code in a new project to eliminate everything else?

They all need to have the same material an respect the dynamic batching guide lines: