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 / dbMouseMoveX calibration.

Author
Message
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 10th Jul 2007 16:22
I'm using the dbMouseMoveX and dbMouseMoveY to move my player. but only when I click left mouse button down. Once the button is down I want to set dbMouseMoveX and dbMouseMoveY to 0. So that my screen does not jump, can I do this?
James Bondo
18
Years of Service
User Offline
Joined: 12th Nov 2006
Location: Denmark
Posted: 11th Jul 2007 20:49
if i understand you right, what you need to do is make the camera follow the player instead of the mouse when you click the button. That should do the trick.

Using Dark GDK.NET
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 11th Jul 2007 22:09 Edited at: 11th Jul 2007 22:13
Ya, this is a bit hard to explain.

Ok not sure, but if you ever played W.O.W(world of warcraft) notice you can move the mouse over the game and nothing changes in the scene. Now if you click on the environment the tracking starts. If you release you're free from disturbing the navigation. Now with most DARK Basic games(demos) once the game is started the mouse is ceased. Sort of stuck to the game, and no way to break it. Well this can be fixed by only engaging the navigation when the user clicks on the screen.

if (dbMouseClick() > 0)


Although when doing this function



the calculation is made from the position of the mouse . So clicking on the center vs the upper left would put the player facing in different locations.

The way to fix this wold be to fix the dbMouseMoveX and dbMouseMoveY to 0 at click.

but there are no set functions that I see..
Hope that helped?
James Bondo
18
Years of Service
User Offline
Joined: 12th Nov 2006
Location: Denmark
Posted: 12th Jul 2007 15:55
You mean a command to put the mouse in the center of the screen? there should be, dont remember its name tho. Tho, you can use windows API to center the mouse.

Using Dark GDK.NET
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 12th Jul 2007 17:18 Edited at: 12th Jul 2007 18:24
That may work, Ill give it a go. thx.


actually I found a hack way to do this...


first time around it sets to the current angle of the cam.

Login to post a reply

Server time is: 2024-11-16 18:13:35
Your offset time is: 2024-11-16 18:13:35