Results 1 to 2 of 2

Math Help - Matrix rotations

  1. #1
    Newbie
    Joined
    May 2008
    Posts
    2

    Matrix rotations

    I'm storing a matrix to represent the rotational position of a ball. I initialize it to an identity matrix of 100 010 001, which represent the x axis in my coord space.

    When the ball receives an impulse, it starts traveling in said direction, but sufarce friction makes it start to roll. I've calculated the axis of rotation, and multiplied that original vector by a matrix formed from a quaternion.

    This works perfectly, until the ball bounces off of something other than a 180 degree turn around. It works in all direction of impulse, until it gets off of it's x-y-z initial axis.

    I'm new here, so I don't exactly know what to provide to help you help me. So please take that into consideration. I can tell the rotation is working because I am raytracing the ball, using the matrix to rotate a vector from the center of the ball to the outside, then using that to look up UV coords in a texture map.

    I believe the problem is that I need to rotate my rotation matrix before I multiply it to the existing matrix...

    Ideas?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    May 2008
    Posts
    2
    *********FIXED********

    Apparently if you want to rotate ball by it's own (relative axis) you do current_matrix * what_to_rotate_by

    But if you want to rotate by a World axis, you
    current_matrix = what_to_rotate_by * current_matrix

    So simple.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. rotations
    Posted in the Geometry Forum
    Replies: 3
    Last Post: April 1st 2011, 10:30 AM
  2. Calculus Rotations Help!!!!
    Posted in the Calculus Forum
    Replies: 2
    Last Post: May 20th 2009, 01:52 PM
  3. Rotations
    Posted in the Geometry Forum
    Replies: 2
    Last Post: March 31st 2009, 02:09 PM
  4. Rotations
    Posted in the Geometry Forum
    Replies: 1
    Last Post: February 5th 2008, 10:09 AM
  5. Rotations ????
    Posted in the Geometry Forum
    Replies: 4
    Last Post: January 16th 2008, 11:44 PM

Search Tags


/mathhelpforum @mathhelpforum