[SOLVED]why tree's trunk is under ground?


12-03-2009 13:50:27

like in the example 1,I want display my tree on the ground, code is
position.x = Math::RangeRandom(0, 1500);
position.z = Math::RangeRandom(0, 1500);
position.y = HeightFunction::getTerrainHeight(position.x, position.z);

scale = Math::RangeRandom(0.5f, 0.6f);

treeLoader->addTree(myEntity, position, yaw, scale);

but only part of my tree display on ground, much trunk is under ground:

my tree.mesh is a total tree:

what's the trouble?


13-03-2009 02:28:04

my god, this forum is not active almost.


13-03-2009 03:25:48

let me reply this problem.
The reason is that the model's center is in center not the bottom.
the soleved step:


13-03-2009 13:30:07

my god, this forum is not active almost.

Or someone needs to have a little more patience. :wink:


23-03-2009 18:52:50

if you only have access to the mesh you can use meshmagick to realign the model