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 / World axes and camera zero

Author
Message
zog
16
Years of Service
User Offline
Joined: 13th Dec 2007
Location: Southport UK
Posted: 4th Aug 2008 07:09
I have been messing around trying to create a level editor, with multiple camera views. I discovered that when I use the function

dbRollCameraLeft on camera zero, my world axes seem to get redefined relative to camera zero's local rotation. When I come to re-orientate camera 0 manually for the next frame the axes have changed, so this leads to an interesting oscillatory motion of the camera. Is there anyway to fix the world axes in place so they are not affect by camera 0.
I tried the same code with a second camera and this camera behaves, correctly as I would expect it to do.

Thanks for any help in advance,


Jack Taylor

Jack Taylor
zog
16
Years of Service
User Offline
Joined: 13th Dec 2007
Location: Southport UK
Posted: 5th Aug 2008 08:16 Edited at: 5th Aug 2008 08:50
Here is the source code to replicate the bug.
If this is a bug I will post it into bug reports. The source code contains comments detailing the problem.

Jack Taylor

Attachments

Login to view attachments
zog
16
Years of Service
User Offline
Joined: 13th Dec 2007
Location: Southport UK
Posted: 7th Aug 2008 00:58
I think I understand what's going on now, I didn't realise that the DarkGDK system uses Euler Angles to define the objects rotation in space. What I have to do is convert the angles returned by dbCameraRotation routines back to world coordinates. I think EZRotate can help me with this. Surprisingly this isn't mentioned anywhere in the documentation. I still feel like a right dunce though!

Jack Taylor

Login to post a reply

Server time is: 2024-11-20 17:46:03
Your offset time is: 2024-11-20 17:46:03