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 / camera angle y

Author
Message
Dimension
20
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 30th Jul 2010 22:45
For some reason I can not get my program to run correctly I tried even converting the code to DarkBASIC and seem to work fine in DarkBASIC but won't work in C++. The program will basicly rotate using movement of mouse in x and when the mouse is clicked it will position the camera in the direction but in C++ it goes the wrong direction. Any ideas of whats wrong with the program?



Here is the DarkBASIC code that works

Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 30th Jul 2010 23:11
dunno if this is the cause, but sin and cos returns radians not degrees
either use D3DXToDegree ( sin ( w/e ) ) or use dbSin/dbCos
D3DXToDegree might be D3DXToDegrees, not sure

Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 30th Jul 2010 23:11 Edited at: 30th Jul 2010 23:12
Could it be your sin and cos returning in radians?
Try dbSin and dbCos.

EDIT: Lol, posted same minute with same answer, you're pretty quick off the draw Hassan, I'll get you next time

Dimension
20
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 30th Jul 2010 23:53
Works great thanks.
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 31st Jul 2010 13:07
lol @ matty

Login to post a reply

Server time is: 2024-11-19 20:45:16
Your offset time is: 2024-11-19 20:45:16