Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Object Rotation

Author
Message
zappy
16
Years of Service
User Offline
Joined: 26th Nov 2007
Location:
Posted: 23rd May 2008 02:50
I'm trying to rotate an object around the world's y axis instead of the object's.
pls help...
bobba
16
Years of Service
User Offline
Joined: 10th Apr 2008
Location:
Posted: 23rd May 2008 05:05
You could be a little clearer m8!

Do you want the object to orbit around the y axis, I.e. if it is a distance of 5 from the y axis it will always keep the same distance and move round in a circle. and if so do you want it to rotate as it orbits?

Or is the object placed on the y axis and just needs to rotate?

If you specify the problem better I will help you crank the maths.
zappy
16
Years of Service
User Offline
Joined: 26th Nov 2007
Location:
Posted: 24th May 2008 10:10
Sorry for the lack of detail...

I don't want the object to orbit. The object is in a fixed position.

I've tried using dbRotateObject and dbTurnObject, but that just rotates the object around it's own axis.

What i want to do is spin the object around the world's axis.
Here's an image to show you what i mean http://www.postimage.org/image.php?v=aVRQ6LA
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 24th May 2008 19:22 Edited at: 24th May 2008 19:24
I recommend you do that in two steps.

1st: Rotate on Y

2nd: Roll Left to desired tilt.

[edit]

You need to reset each loop... pseudo


[/edit]

Codger
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 25th May 2008 03:04
zappy
What you are attempting to do is orbit the object just at a radius of 0.
One approach would be to create a small sphere at the center of rotation. Tilt your object, glue your object to the sphere then rotate the sphere.


All the best

Codger

System
MacBook Pro
Windows XP Home on Boot Camp
zappy
16
Years of Service
User Offline
Joined: 26th Nov 2007
Location:
Posted: 28th May 2008 02:38
Thanks jason p sage.

Works perfectly.

I owe you a beer !!!
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 28th May 2008 02:50
Awesome - but take note of Codger's suggestion to as that has merit for more complicated scenarios and in those more complicated scenarios where a quick twist or nudge isn't good enough (or to many steps to get result) what he recommends is perfect.

Like... If you place some object at 0,0,0 (in prep to a glue operation) and rotate to 0,0,0. (Can be so small its not vible.. you might even be able to hide it without the thing we'd glue to it being hidden! (I think thats codgers point)

then you position the "object ya want to glue" where ya need in relation to your object thats sitting at 0,0,0. You rotate the thing as you need ... THEN you perform the Glue deal.

After that you move your "invisi" main (root) object where ya want and rotate, and the one you "glued to it" will always be at the correct position relative to it.

Basicallt this would allow some complex version of my cheap short cut!

Just keep it mind. Nothing wrong either way - but its just good to know more than one way so when you get hit with something like this again - you have options to pick from that might do a particular job easier and/or bettter/faster whatever.

Login to post a reply

Server time is: 2024-11-20 11:30:20
Your offset time is: 2024-11-20 11:30:20