- Home /
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.
Answer by qJake · Jul 29, 2010 at 06:48 PM
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.
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 9400$$anonymous$$ graphics chip
and the car uses a parallax specular shader.
and it has 1 material on it with a 256x256 tex size and a bump$$anonymous$$ap size of 1024x1024.
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.
...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?
Your answer
![](https://koobas.hobune.stream/wayback/20220613070037im_/https://answers.unity.com/themes/thub/images/avi.jpg)