Page 1 of 1

Terrain

Posted: Sat Mar 11, 2017 4:07 am
by marksibly
Hi,

I'm trying to use the btHeightfileTerrainShape collider and am having a few issues.

For one thing, the include file wasn't even being included by btBulletCollisionCommon.h! This is in bullet3-2.85.1, perhaps there are some known issues with terrain in this version so it's been left out?

Anyway, after #including btHeightfileTerrainShape.h, I got terrain working except I can't 'bounce' sphere's off it reliably - I set restitution of both terrain and sphere to .9, and when I 'fire' a sphere at the terrain it bounces off at a weird angle, even with a 'const' terrain of height 1. Sometimes a sphere will start bouncing 'forever' in weird little hops...

I also have some boxes falling on the terrain and they seem to work OK.

I can bounce sphere's off a bounce just fine too - just not off a terrain.

Any help most appreciated!

Bye,
Mark

Re: Terrain

Posted: Tue Mar 14, 2017 10:41 am
by Jez Hammond
Hi

I've seen this happen with spheres and heightfields when the btDbvtBroadphase is used. Instead, try a btAxisSweep3 for your overlapping pair cache. Now even extremely low density spheres collide perfectly even with dense dynamic stuff also on a heightfield.