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 / Mouse Camera Movement

Author
Message
Siolis
18
Years of Service
User Offline
Joined: 19th May 2006
Location:
Posted: 8th Feb 2007 20:38
• Then program the mouse so that the camera pans around based on the location of the mouse from a left clicked point.

Greetings, I’m trying to do the above but can’t seem to work out how. What I want to happen is that when the user clicks left and camera pans in the direction of the mouse, i.e. if the mouse is dragged upwards then the camera pans upwards. Anyone got any ideas?

A Dragons Legacy...a blog by S.R.Deoden
"Look you son of a suitcase..." - Rinsewind yelling at the Luggage in The Light Fantastic
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 8th Feb 2007 20:45 Edited at: 8th Feb 2007 20:47
Is this DGDK or DGDK.NET?

In any case, you can use the dbMouseMoveX and dbMouseMoveY, and apply the values as rotation increments.



Experiment with that to see if it gives you the desired effect.

Paul.

Siolis
18
Years of Service
User Offline
Joined: 19th May 2006
Location:
Posted: 9th Feb 2007 16:38


Perfect, just what I wanted. I set up camera modes on num buttons 1, 2 and 3, added the code into 3's stratum and tried it. It was a bit fast but ill adjust it some how after I’ve added in the left click code.

Just incase your wondering, I’m trying to make a camera mode like World of Warcraft's perspective adjustment where you click left and move the mouse to orbit the characters head. I want it to compliment my 3RD person prospective and a RTS style view to go with my unique battle system which I can’t talk about.

A Dragons Legacy...a blog by S.R.Deoden
"Look you son of a suitcase..." - Rinsewind yelling at the Luggage in The Light Fantastic
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 9th Feb 2007 17:29
All sounds interesting, show some piccies when you're ready

Paul.

RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 9th Feb 2007 18:19
Just pointing out, to slow down the speed of pan add a multiplier. Basically multiply the mouse speeds by a decimal like 0.1 (usually best), or divide it by a larger number, like 100. If that makes sense.


:: Check out the new FPS Tutorial's Progress at http://www.freewebs.com/ruccus
along with code, media, and more.
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 10th Feb 2007 00:33
Hi I'm doing a LevelMapper but I'm having some issues with the mouse for instance when I press "preview" you can look from a FPS perpective but when I press SPACE to exit to a top view, the mouse pan is completely .... anyone has any idea how to correct this?

p.s Mouse pan is made by holding rightclick

Attachments

Login to view attachments
Siolis
18
Years of Service
User Offline
Joined: 19th May 2006
Location:
Posted: 10th Feb 2007 11:48
I guessed that RUCCUS but thanks anyway.

Will do APEX but I’ve only just started programming after finishing the GDD and its an RPG (should have said) so it will be ages yet...could post screens as I go I suppose, might be something for my website actually.

SD

A Dragons Legacy...a blog by S.R.Deoden
"Look you son of a suitcase..." - Rinsewind yelling at the Luggage in The Light Fantastic
Siolis
18
Years of Service
User Offline
Joined: 19th May 2006
Location:
Posted: 10th Feb 2007 15:25 Edited at: 10th Feb 2007 15:40
Quote: "


Perfect, just what I wanted. I set up camera modes on num buttons 1, 2 and 3, added the code into 3's stratum and tried it. It was a bit fast but ill adjust it some how after I’ve added in the left click code.

Just incase your wondering, I’m trying to make a camera mode like World of Warcraft's perspective adjustment where you click left and move the mouse to orbit the characters head. I want it to compliment my 3RD person prospective and a RTS style view to go with my unique battle system which I can’t talk about.
"


I just checked this code and to work it in the way i wanted the code must be this:



Not the above quoted code.

A Dragons Legacy...a blog by S.R.Deoden
"Look you son of a suitcase..." - Rinsewind yelling at the Luggage in The Light Fantastic

Login to post a reply

Server time is: 2024-09-27 17:30:57
Your offset time is: 2024-09-27 17:30:57