//noinspection ConstantConditions
final Vector3f l_up = ms_core.getTerrain().getSurfaceNormal(getWorldCenter(), ms_tmp);
if (l_up != null)
{
rotateUpTo(l_up);
afterMove();
}
}
my object, in my case a spider, has the correct angle, but floats a bit above the ground. i guess it's rotated around its center, but that's wrong - it has to be rotated around the center where it touches the terrain, or change the up vector and move it "downwards" by the right distance. how can i do that?
doesn't matter, right now the hhexen engine assumes the lowest point to be the one that must be moved upwards until it matches the terrain height at below the nodes center