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

sunrisefe

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?

sunrisefe

13-03-2009 02:28:04

my god, this forum is not active almost.

sunrisefe

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:

Fish

13-03-2009 13:30:07

my god, this forum is not active almost.

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

dudeabot

23-03-2009 18:52:50

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