this one is creeping be out:
i have a few actors in my game. these actors can shoot fireballs. now, if i let them throw ms3d-objects, everything is fine. if i give them md2-models, they shoot downwards instead of at me. if i give them primitives like a cone, they shoot at me again.
WHAT THE ?!?!?!?
i'm not talking about the model's orientation, it's the direction of the projectile where it's flying to. i don't get it. i apply exactly the same rotation, no matter what kind of model it is. if i randomly rotate the model itself, the rotation is applies correctly. if i simply copy the actors rotation, the projectile is flying correctly. but if i do this:
public void turnTo(final Vector3f p_target, final boolean p_adjustYLookAt) {
assert !Float.isNaN(p_target.length());
final Vector3f l_vector3f = ms_tmp11.set(p_target).subtractLocal(m_boundingHelper.getWorldCenter()).negateLocal();
if (!p_adjustYLookAt) {
l_vector3f.y = getWorldCenter().y;
}
getLocalRotation().lookAt(l_vector3f.normalizeLocal(),
Vector3f.UNIT_Y);
afterMove();
}
it *should* rotate the projectile exactly to where the actor is aiming at - but it does only work for non-md2-models. i checked it in the debugger - the local rotation of my projectiles is the same for both model types, and yet the md2s are about 90 degrees off course.
any ideas? where should i look at?