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 / Using mouse to look around

Author
Message
VB and GDK
15
Years of Service
User Offline
Joined: 2nd Jun 2009
Location:
Posted: 17th Jul 2009 06:37
I am tring to use the mouse to look around but it doesnt seem to work i have this:

Camera.DefaultCamera.RotateCurrent(DarkGDK.IO.Mouse.X, DarkGDK.IO.Mouse.Z, DarkGDK.IO.Mouse.Z)

I wont work, is there a way.
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 17th Jul 2009 10:18
Im not sure if thats GDK.Net or a class library u r using with C++ GDK, but try this :



instead of sending the mouse position to each of the X Y Z co ords in the rotate camera function...

send to X - Camera X Angle + Mouse Move Y
send to Y - Camera Y Angle + Mouse Move X
send to Z - Camera Z Angle

you can also apply different modifiers in the equation to get different speeds of rotation.

If it ain't broke.... DONT FIX IT !!!
VB and GDK
15
Years of Service
User Offline
Joined: 2nd Jun 2009
Location:
Posted: 18th Jul 2009 02:42
Sorry i posted on the wrong board
Kaboooom2000uk
15
Years of Service
User Offline
Joined: 1st Aug 2009
Location: England, United Kingdom
Posted: 7th Aug 2009 08:16
Mista Wilson, Thanks very much, the code snippet works for me in DarkGDK!

Login to post a reply

Server time is: 2024-10-01 10:20:21
Your offset time is: 2024-10-01 10:20:21