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 / Virtual Trackball Problems

Author
Message
Adam Sykes
16
Years of Service
User Offline
Joined: 24th Mar 2008
Location:
Posted: 25th Mar 2008 03:59
I am trying to implement a virtual trackball system, which when the user clicks and drags the mouse - the model is rotated.

I can't seem to find the problem in my code, which is based on quaternions. When the program is run, the model just jumps and does not rotate.

Please help, I have been through numerous maths tutorials, just can't see what is missing. I am sure it will be something obvious.

Thank you for any help.



Adam Sykes
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 25th Mar 2008 18:39
WOW - Um... speaking for myself - I wouldn't touch that with my ten foot pole... BUT I MIGHT try to accomplish the same thing ... Where you record a click and just rotate accordingly on whatever axis. Might be easier.

Adam Sykes
16
Years of Service
User Offline
Joined: 24th Mar 2008
Location:
Posted: 26th Mar 2008 13:26
I did look at just rotating the camera. The trouble is that the rotate example given with the GDK, rotates the camera, like a look feature on a FPS. I am trying to create a model viewer, so I want the model to appear to rotate around a central point. There may be more than one model, so rotating the model itself isn't an option.

As an analogy I basically need the camera to move on the surface of a sphere (of view, not an actual sphere), looking towards the centre of that sphere. The models being viewed would then be inside that sphere of view. This is all to be controlled by clicking and dragging the mouse, not just by moving the mouse, as that is required for another feature.

Thanks

Adam Sykes

Login to post a reply

Server time is: 2024-09-29 15:23:25
Your offset time is: 2024-09-29 15:23:25