Streaming terrain with bullet

razer
Posts: 82
Joined: Sun Apr 04, 2010 10:08 pm

Streaming terrain with bullet

Post by razer »

I wish to have "infinite" height field terrain generated by math function.
What is best way to do that with bullet.

Thanks
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Streaming terrain with bullet

Post by Erwin Coumans »

The best way is to create a custom shape derived from btConcaveShape and implement the 'processAllTriangles' method (generating several temporarily triangles on-the-fly that overlap with a given AABB).

See also btHeightfieldTerrainShape for an example (there are some other virtual methods that need some implementation).
Thanks,
Erwin