Lua Model orientation messed up

Recently I’ve been working on a pilot-able Halo 3 Pelican Entity for a server. Ive gotten it nearly done but i have a minor problem.

Problem: The Pelican flies sideways, This is only a minor error in the orientation of the model. I just don;t know how to fix it. Any Ideas?

Picture: (Picture of the pelican in flightflying sideways)

Lua Code:




Thanks :slight_smile:

You just made a thread about this only an hour ago. It’s a good idea to use the same thread if you are having multiple issues with a single project.

Your model is flying sideways because it was imported to Source sideways. You will need to find the angle by which to offset your entity’s angles, in this case it’s probably (0,90,0) or (0,-90,0). Unfortunately, you cannot apply angular offsets to compensate for the model’s bad angles through simple angle addition, since the results are not what you might expect. From my experience, the only way of generating a corrected angle is rotating a copy of the reference angle about its right vector by the offset pitch, rotating about its up vector by the offset yaw, and rotating about its forward vector by the offset roll. This will work, but I’m certain there’s a better way. What exactly that way is, however, I am not certain of.

For future reference, the questions and help section, which is probably a more appropriate place for a thread like this, is over here.

Thanks Ghor, But I still need to know where I would input the vector changes?

i will directly fix that in the model, i will do it tomorrow give me a link to the download

uncompiler crash

Do you need the raw model?