x


Physics.simulate chews CPU but not using physics at all - Am I?

I have been profiling my application with the profiler. I am using Time.timeScale to control the speed of my application. As I increase the speed by adjusting the time scale, Physics.simulate chews up considerable CPU even though I am not simulating any physics. There are up to 300 calls. using almost as much CPU as Camera.Render!! Anyone have any clues?

Thanks in advance Tom

more ▼

asked Mar 03 '10 at 08:11 AM

cncguy gravatar image

cncguy
1k 21 25 36

Can you confirm that you have not a single Collider, Rigidbody, or CharacterController in your scene at all? If you have any of those, you are using the Physics engine.

Mar 03 '10 at 09:56 AM runevision ♦♦

As far as I know yes. While running in the editor I have gone through all the active objects and I cannot find any of the above mentioned components.

Mar 05 '10 at 09:05 AM cncguy
(comments are locked)
10|3000 characters needed characters left

2 answers: sort newest

I can't remember exactly how I fixed this. I think I found something obscure that I was creating dynamically through scripting that had a physics object on it. Once I removed it the physics calls were gone but it didn't turn out to have any appreciable effect on performance.

more ▼

answered Jul 05 '10 at 10:22 PM

cncguy gravatar image

cncguy
1k 21 25 36

(comments are locked)
10|3000 characters needed characters left

If you want to print out a list of all the components your game objects are using at run time, AngryAnt wrote a decent editor script that collates all the component types and lists them out for you.

http://eej.dk/angryant/general/tipsandtricks/where-did-that-component-go/

So if in the future you need to find something of a particular type, you can use that.

more ▼

answered Jul 06 '10 at 12:32 AM

Tetrad gravatar image

Tetrad
7.2k 27 37 89

Hi thanks for that.

Jul 06 '10 at 02:29 AM cncguy
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1870
x472
x154

asked: Mar 03 '10 at 08:11 AM

Seen: 2975 times

Last Updated: Mar 03 '10 at 08:11 AM