x


wheel collider performance problem

hi, i am making a FPS game and i have a script where you can get in and out of a car.

but that works fine, the problem is that when i dont look at the car i get about 100-120 fps var when i look towards the car i get about 20-30 fps. i am wondering what makes wheelColliders take so many fps to run? and is there a way to make them run better?

the car is a humvee-jeep thing and it has 4 wheels. and a mass about 1000. and a basic car control script.

thanks.

more ▼

asked Jul 29 '10 at 06:44 PM

3dDude gravatar image

3dDude
2.6k 65 76 103

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

1 answer: sort voted first

If your game lags when you look at your car, the car is too detailed, or has too intense a shader to be able to run fast on your computer. You need to optimize your model, textures, and shaders. It has nothing to do with rigidbodies or colliders whatsoever.

more ▼

answered Jul 29 '10 at 06:48 PM

qJake gravatar image

qJake
11.6k 43 78 161

the main body of my car hase : 247 verts,160 tris. each wheel hase 62 verts and 40 tris.

and my computer has a NVIDIA GeForce 9400M graphics chip

and the car uses a parallax specular shader.

Jul 29 '10 at 07:06 PM 3dDude

and it has 1 material on it with a 256x256 tex size and a bumpMap size of 1024x1024.

Jul 29 '10 at 07:09 PM 3dDude

Well that's all great, but you said that this only happened when you looked at it, and things don't get rendered when you're not looking at them. Physics simulations do still occur, though, and they're typically independent of the camera.

Jul 29 '10 at 09:40 PM qJake

ok thanks for your help :)

Jul 29 '10 at 10:30 PM 3dDude

...did you test with a 'none' shader or rendering OFF, etc... to get some benchmarks? can you offer some telemetry, that way we get a more precise idea of how much we can push the engine?

Sep 19 '10 at 04:02 PM dingben
(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:

x1175
x418
x81

asked: Jul 29 '10 at 06:44 PM

Seen: 1161 times

Last Updated: Jul 29 '10 at 06:44 PM