getting model to sit on terrain with libmini

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!
Post Reply
red82
Posts: 13
Joined: Fri Jan 14, 2005 3:38 am

getting model to sit on terrain with libmini

Post by red82 »

I am using the libmini library and the CLMTerrainSceneNode class that is discussed here: http://irrlicht.sourceforge.net/phpBB2/ ... ni&start=0
My problem is that my model of the faerie will not sit on the surface of the terrain. I initially set them high above, and let gravity drop them to the surface, but it always comes to rest with a large gap between the model and terrain. I tried both irrlicht's physics and newton physics engine for gravity. I reread that post and I believe it says to use CTERRAINHEIGHTANIMATOR.h to place the model on the terrain. Does anyone have example code on how to use this header file? I know c++ but I am not good with implementing header files.

Thanks!
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

It most likely has something to do with the actual model. Check what the bounding box of the model is.
kaeles-notlogged

Post by kaeles-notlogged »

you might look at the "elipse" size on the irrlicht collision detection, you have to make it the same size of the model else it will set at a weird hieght or sink into the terrain...


i believe you set this when you call createCollisionAnimator or whatever....
Post Reply