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

  • SEARCH
  • Home
  • 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 3627536
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:54:03+00:00 2026-05-18T23:54:03+00:00

I have a Cube which I want to rotate using mouse motion. So if

  • 0

I have a Cube which I want to rotate using mouse motion. So if I move my mouse to the left it rotates as if rotationX was increased. When I move right rotationX is increased. Moving Up and Down alters rotationY.

This looks fine as long as you modify only one dimension (either rotationX or rotationY). But if I have already changed rotationX and then try to modify rotationY the results are weird. If rotationX is 180 rotationY effects are reversed. It basically is quite unpredictable and certainly not suitable for user.

I have tried to look around (failed), read about quaternions (couldn’t understand), tried some out of blue and very complex trigonometric calculations (made a fool out of myself) and so I am stuck now. I’ve found this SO question Best way to translate mouse drag motion into 3d rotation of an object but it doesn’t help me a bit, I can’t understand any of the answers, really.

A complete, working solution/algorithm in AS3 would be the best, but some pseudo-code or just clear explanation will be really appreciated.

  • 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-18T23:54:04+00:00Added an answer on May 18, 2026 at 11:54 pm

    You are applying the rotationY to an already rotated object. So if you set rotationX to 180, and THEN set rotationY, you are really rotating the object standing “on its head”. If you want to apply both the x and y rotation at the same time, it is best to use a matrix. The link you provided is useful: it explains everything once you understand the concept of matrices. You should read up on this, especially if you intend to do more 3D in the future.

    For now, just have a look at the Flash manual page for Matrix3D. It should provide all the information and examples you need to get going.

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

Sidebar

Related Questions

I have a simple 3D cube that I can rotate using the following code:
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Right now I'm drawing a cube with OpenGL, I'm using Windows and WGL context.
I have a cube in SSAS 2005 that calculates running sums over millions of
I have a line (actually a cube) going from (x1,y1,z1) to (x2,y2,z2). I would
I have a large set of data (a data cube of 250,000 X 1,000
Have just started using Google Chrome , and noticed in parts of our site,
Reporting Services 2005 My layout is like this: I have the mainreport which contains
Once again I have hit the wall. How to replace escape characters using regular
Have you ever seen any of there error messages? -- SQL Server 2000 Could

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.