Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3497400
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:21:57+00:00 2026-05-18T12:21:57+00:00

I am trying to achieve the same rotational effect like Maya in my project.

  • 0

I am trying to achieve the same rotational effect like Maya in my project.
I have some knowledge on quaternions and the trackball example.

Unfortunately I am still unable to wrap my head around the concept of using the quaternions to get the desired effect.

Basically I am still getting the same issue I had before with the 3d trackball. After flipping the object upside down, and then trying to rotate to the right, the object will rotate to the left. Well actually its my camera rotating around the focus point in the opposite direction.

The problem is that I am using the screen coordinates & trackball to get the old / new vectors and getting the angle of rotation from those two vectors. I will always get the wrong axis of rotation this way.

How should I go about solving this issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T12:21:58+00:00Added an answer on May 18, 2026 at 12:21 pm

    I don’t know Maya so I can only guess that its rotation is like this: if you rotate left-right, it feels natural. Then if you rotate the object up-down 180 degrees, then rotate left-right again, it still feels natural.

    If you are familiar with the concept of using a matrix to do transformations (like rotate, scale and translate), well a quaternion is just the same concept but it only allows rotations, so you might want to use it to constrain your transforms to just rotations. In practice, you can use either a matrix or a quaternion to do the same thing.

    What you need to do is remember the current quaternion state for the object, then when the next frame of rotation occurs, multiply the new rotation with the old quaternion (in that order) to give you the next frame’s quaternion. That will ensure that no matter what orientation the object is in, the next frame’s rotation will be applied from the viewer’s viewpoint. This is as opposed to some naive rotation where you just say “user is scrolling up/down, therefore alter the object’s X-axis rotation”, which causes that flipping.

    Remember, like matrices, quaternions need to be multiplied in reverse order that the actions are actually applied, which is why I said to multiply the new operation by the existing quaternion.

    To finish with an example. Let’s say the user is going to perform 2 actions:

    • On frame 1, the user rotates the object 180 degrees about the X axis (up/down rotation).
    • On frame 2, the user rotates the object 90 degrees about the Y axis (left/right rotation).

    Lets say the object has a quaternion Q. Every frame, you will reset the object to its default coordinates and apply the quaternion Q to rotate it. Now you might initialise it with the identity quaternion, but let’s just say the initial quaternion is called Q0.

    • On frame 1, create a new quaternion R1 which is a “rotate 180 degrees about the X axis” quaternion (you can find some maths to compute such a quaternion). Pre-multiply the new operation by the existing quaternion: Q1 = R1 * Q0.
    • On frame 2, create a new quaternion R2 which is a “rotate 90 degrees about the Y axis” quaternion. Pre-multiply the new operation by the existing quaternion: Q2 = R2 * Q1.

    On frame 1 you will use Q1 to display the object, and on frame 2 you will use Q2. You can simply keep applying any subsequent user actions to the quaternion and it will always be rotated in the viewer’s frame of reference.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Server controls like Image.ImageUrl make this very easy, but trying to achieve the same
I am trying to achieve a scrolling effect using jQuery. I have a background
I am trying to achieve the same behavior as indicated in the following post.
I've trying to achieve something like this: class Base { public: Base(string S) {
how can i paste something on multiple lines? i'm trying to achieve the same
In the below image I am trying to achieve the following.I have a table
Here's what I'm trying to achieve. I have a directory with over 4200 sub-files/sub-directories,
Trying to achieve: same firefox profile throughout tests Problem: Tests are spread over 30
I am building a dynamic listview and I am trying to achieve the same
I'm trying to achieve the effect that is part of the android google talk

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.