XNA Creators Club Online
Page 1 of 1 (3 items)
Sort Posts: Previous Next

Rotations problem

Last post 05-11-2008 3:20 PM by Duque360. 2 replies.
  • 05-10-2008 11:52 AM

    Rotations problem

    Hi to all, this it is the first time that I write here, and I would like to send a greeting to all the partners of the club. Well, I have a small problem.

    I have three free orthogonals normalized vectors managed by rotations angles and one quaternion. I would like to implement the opposite in the same class, given a point in the space, to find the necessary rotations angles to guide my vectors (Forward, Up and Right) toward that point maintaining the vectors Up and Right in their current state. For example, the vectorial Forward points toward the left (-1,0,0), the Up is Backward (0,0,1) and the Right is (0,1,0) and I want that Forward points toward (1,1,1). In this example I believe that the solution is to apply 45º on Yaw and -45º on Pitch, but I have used it and it doesn't work.

    thank you for the help and a greeting to all again

  • 05-11-2008 11:35 AM In reply to

    Re: Rotations problem

    The first scenario you describe would be -90 on roll and 90 on yaw

    The second one, before writing an algorithm for, you should normalize it.
    Regards,
    Louis Ingenthron
    Fortis Venaliter
    Developer of Unsigned
  • 05-11-2008 3:20 PM In reply to

    Re: Rotations problem

    Thank you friend, you are right in your comment, but I found an alternative solution. I reset my quaternion creating a Matrix from LookAt and Conjugate the result, and the end set to zero the three fields yaw, pitch and roll.

Page 1 of 1 (3 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG