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.

DarkBASIC Professional Discussion / Rotation questions

Author
Message
GeneralFOL
16
Years of Service
User Offline
Joined: 29th Mar 2010
Location:
Posted: 29th Mar 2010 21:34
Hi all, im trying to program a simple model viewer application for use as a college task.

I am stuck at the moment with the mouse controls, im simply trying to make it so that when you click on the screen and then drag the screen, the object will rotate, i can get it to rotate but i need it to corrosponed to screen axis rather than the object axis, for example i rotate the object right but then if i rotate it up the up is now facing right if you see what i meen, where as i want the up to stay at the front even if it has been rotated, resetting the objects axis might fix this after each movement, but im not sure how.

Can anyone help please.

Kira Vakaan
17
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 29th Mar 2010 22:45
What if you made the camera orbit around the object? That way you won't have to deal with crazy object angle calculations. Check this out:


Is that what you're looking for?

Good luck
GeneralFOL
16
Years of Service
User Offline
Joined: 29th Mar 2010
Location:
Posted: 29th Mar 2010 23:20
Thats great thanks for that, works a treat.

Iain

Login to post a reply

Server time is: 2026-07-26 21:13:02
Your offset time is: 2026-07-26 21:13:02