The problem I think you are facing is that you are using the same transformation matrices for rotations regardless of how the 'ship' is already oriented. Getting this right certainly can be challenging. I'm not very good with math and trying to visualize a solution just give a headache Should I be using 3 vectors (left, up, forward) for orientation as I'm also going to have to calculate things like acceleration from thrusters and stuff that will change with the rotation (orientation?) and from the models perspective points in a direction like rocket-engines. So I'm searching for examples, links and the theory of rotating a 3d model (like a spaceship, airplane). It doesn't help either that simulator style rotation examples are almost impossible to find. I tried several tricks to try and counter this but somehow I feel I missing something. Here's a image that illustrate my problem. Using glRotatef(angleX, 1.0f, 0.0f, 0.0f) ĭoes not work properly if I rotate the model(spaceship) first 90 degrees to the left and then rotate it "up". I can't figure out how to make proper rotations.īeing a space-simulator I want similar controls to a flighsim Now I started again after sometime and now I'm using Opengl (with SDL) instead to render the 3d models. I been working on a space sim for sometime now.Īt first I was using my own 3d engine with software rasterizer.īut I gave up when the time for implementing textures was due.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |