Results 1 to 2 of 2

Math Help - Help Making "Flight Simulator" Style Movements (based on rotation along axes)

  1. #1
    Newbie
    Joined
    Mar 2014
    From
    Portland
    Posts
    1

    Help Making "Flight Simulator" Style Movements (based on rotation along axes)

    Hi, I am working on a video game where the camera movement (in this case what the viewer sees) is controlled by a joystick. I want the camera movement to act like a flight simulator meaning the following:
    When the user points the joystick "down" (toward the screen) the camera points down (think of this as tilting along the X axis (left to right of screen), or changing pitch, I believe)
    When the user moves the joystick side to side, the camera just "rolls" along the Z-Axis (with the Z axis being the one that would protrude out from the screen).
    By manipulating just these two controls, the user could go all directions, and this is where I am struggling. How to I calculate the distance in each direction, X, Y, Z the user would go based on those rotations.

    For example, if the user rotated along the X axis 90 degrees, the movement would be 100% in the Y direction but,
    regardless of how much the user "rolls" along the Z axis, the movement would be 100% in the Z direction but,
    as soon as there is rotation along the X axis (and rotation along the Z axis), there would be movement in multiple directions
    (i.e. a 90 degree "roll" on the Z axis coupled with a 90 rotation on the X axis would result in a 100% move in the X direction).

    This is basically like using the aileron and wings of a plane. In two dimensions this is as simple as the unit circle, but I am lost when it comes to three. Please help, thanks.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Nov 2013
    From
    California
    Posts
    2,774
    Thanks
    1140

    Re: Help Making "Flight Simulator" Style Movements (based on rotation along axes)

    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 5
    Last Post: January 20th 2013, 02:26 PM
  2. Replies: 2
    Last Post: April 24th 2011, 08:01 AM
  3. Replies: 1
    Last Post: October 25th 2010, 05:45 AM
  4. Trying to find "best" rotation matrix
    Posted in the Advanced Algebra Forum
    Replies: 3
    Last Post: August 6th 2010, 10:34 AM
  5. Replies: 4
    Last Post: November 12th 2006, 07:39 AM

Search Tags


/mathhelpforum @mathhelpforum