Accurate Collision Detection with Terrains

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
thesmileman
Posts: 360
Joined: Tue Feb 10, 2004 2:20 am
Location: Lubbock, TX

Post by thesmileman »

Thats all Niko's code for the getHeight function? Hmmm I guess he is not finished with it yet. Would have been nice to note that.
Peter Müller
Posts: 292
Joined: Sun Mar 14, 2004 5:28 pm
Location: Germany
Contact:

Post by Peter Müller »

Code: Select all

 //! Calculates height of a point in the terrain
bool CTerrainSceneNode::getHeight(core::vector2d<f32> pos, f32& outHeight)
{
   return false;
}
This is the reason why I said, you have to get the hight of the terrain by using an ITriangleSelector :D
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer
DarkWhoppy
Posts: 386
Joined: Thu Sep 25, 2003 12:43 pm
Contact:

Post by DarkWhoppy »

Well, i'm guessing you used one of these functions?

Code: Select all

virtual void  getTriangles (core::triangle3df *triangles, s32 arraySize, s32 &outTriangleCount, const core::matrix4 *transform=0)=0 

virtual void  getTriangles (core::triangle3df *triangles, s32 arraySize, s32 &outTriangleCount, const core::aabbox3d< f32 > &box, const core::matrix4 *transform=0)=0 

virtual void  getTriangles (core::triangle3df *triangles, s32 arraySize, s32 &outTriangleCount, const core::line3d< f32 > &line, const core::matrix4 *transform=0)=0 
DarkWhoppy
Posts: 386
Joined: Thu Sep 25, 2003 12:43 pm
Contact:

Post by DarkWhoppy »

I've got another way.... 8)
bal
Posts: 829
Joined: Fri Jun 18, 2004 5:19 pm
Location: Geluwe, Belgium

Post by bal »

Could you please share it with us :) ?
General Tools List
General FAQ
System: AMD Barton 2600+, 512MB, 9600XT 256MB, WinXP + FC3
Post Reply