Hi,
I'm working on a simple racing game and am using a btHeightfieldTerrainShape as the ground. With a heightfield of 128x128 (as in the vehicle demo) my game runs at full speed. When I increase the mesh size to 256x256 or greater the game slows down.
Is it possible to ignore collisions outside of a certain radius of the car?
Or to create a ~20x20 dynamic heightfield that moves with the car and changes shape based on it's location?
Any help or a nudge in the right direction would be greatly appreciated
Thanks in advance
Optimizing collision detection for a large heightfield
-
- Posts: 13
- Joined: Fri May 23, 2008 4:30 pm
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Optimizing collision detection for a large heightfield
Have you profiled which part of the game exactly slows down?
Large heightfields shouldn't slow-down the game. If so, we need a reproduction testcase to figure out what is wrong.
Thanks,
Erwin
Large heightfields shouldn't slow-down the game. If so, we need a reproduction testcase to figure out what is wrong.
Thanks,
Erwin