OgreOde <-> PLSM2: Falling throgh regions of terrain

fiesch

19-10-2005 15:58:18

Hi, unfortunately i still have a problem with ogreOde collision detection and PLSM2 terrain - on some regions (about 1/4 ) ot the test terrain provided with the sample collision now works fine, thanks to your help.

But on the rest of the terrain collision tests simply fail. The line between properly working terrain and "broken" terrain collison-wise is straight and the non-working areas appear to be square.

My assumption is that it is page-related but i don't have a single clue why since the ray queries should result in a consistent behaviour.

Any ideas?

Falagard

19-10-2005 17:00:36

I've had code that worked pretty fine without falling through with OgreODE in the past.

I'll see if I can find the code - it's old, and won't compile out of the box, but you'll be able to see what I did. Remind me if I forget, because it's going to take me some time to track down the code and post it.

Clay

fiesch

20-10-2005 15:37:46

Any luck yet?

Falagard

20-10-2005 16:33:06

Whaddya know... forgot to look last night. Will try to remember tonite (can't right now I'm at work).

Are you using the terrain callback function? I vaguely remember passing in an insanely huge boundary size to the callback function, and then within the getHeight function having to translate the Vector3 by the size of the page in order for it to work. Can't remember why though - something about the way that the point that OgreODE was attempting to pass to me was off by a value equal to the width of a terrain page...?

fiesch

20-10-2005 18:58:39

I'm using the technique discussed at the end of the "getting actual terrain height data" (or sth ;) ) thread in this forum, started by myself...

Like i said it works like a charm for one of the pages, but not for the rest

Falagard

20-10-2005 19:23:17

Ah can't help you, I used the terrain callback technique ;-)

It's quite probable that what you're doing is faster than the terrain callback though because I think that the terrain callback technique has to query the height of the terrain like a gazillion times while if you construct a mesh collider out of the terrain geometry and stick it into OpCode, OpCode has fast early out methods.

Clay