This is G o o g l e's cache of http://www.flashsandy.org/forum/lofiversion/index.php/t386.html as retrieved on 20 Jul 2007 19:32:04 GMT.
G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
The page may have changed since that time. Click here for the current page without highlighting.
This cached page may reference images which are no longer available. Click here for the cached text only.
To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:Pku5mkkS5cIJ:www.flashsandy.org/forum/lofiversion/index.php/t386.html+site:www.flashsandy.org+index.php&hl=en&ct=clnk&cd=103


Google is neither affiliated with the authors of this page nor responsible for its content.
These terms only appear in links pointing to this page: index php

zeusprod
I'm trying to get a rotating cube to respond to the mouse location.

I want it to behave like the example here:

http://www.tagworld.com/-/widgets/WidgetDe...dget_type_id=36


I can easily set the rotation for x or y based on the mouse position relative to the center of the cube.

The problem is the way the rotations interact is causing an undesirable tumble effect in certain arrangements.

I really want to change the axis of rotation to always be parallel to the monitor or perfectly vertical, no matter how the cube is rotated.

I know I'm missing something obvious.

Should I be rotating the object, the world, the camera, or what?

Can I set the axis of rotation? If so, should I (must I?) use the rotation interpolator?

I'm sure there is some trick to this.

Any insights appreciated.

Cheers,
Bruce
kiroukou
Hi,

THe best thing is to store the euler angles. You increment them depending of your mouse mouvement, and you set the rotation trought euler angles. It provide a smoother rotation that the one I used for th online demos.

I did a test with that, I should retrieve it. Meanwhile you can play in that direction wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2007 Invision Power Services, Inc.