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 / Question about Rotate Camera

Author
Message
Anton
15
Years of Service
User Offline
Joined: 5th May 2009
Location: Ohio
Posted: 5th May 2009 22:04
I'm trying to go off the example for just moving around in a "box" area. I am tyring to make it so that when you click down you can move the camera and otherwise you just can move the mouse freely when not clicked.

Turning around the Y Axis is fine, but not for the X Axis, it seems to reset the Camera Angle for the X Axis to zero when I unclick and go back to the changed Angle when I click back down.

Is there something wrong with the dbXRotateCamera() or is my code. Everything looks the same as far as Y (which works) compared to X.

Any help would be great.


IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th May 2009 23:50
I suspect it's the dbControlCameraUsingArrowKeys function that's resetting the camera angle. Try commenting out that one line initially to see if that's the case.

If it is, then you find that the dbControlCameraUsingArrowKeys function is relatively easy for you to code yourself so that it acts in the way you require.

Anton
15
Years of Service
User Offline
Joined: 5th May 2009
Location: Ohio
Posted: 6th May 2009 21:45
Yea it was definitely was that, which is lame. It'll probably be best to go ahead and make my own camera move function anyways. Its working great so far.

Thanks for the help.

Login to post a reply

Server time is: 2024-11-05 18:57:36
Your offset time is: 2024-11-05 18:57:36