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.

Newcomers AppGameKit Corner / How to get MouseMoveX ( ), MouseMoveY ( ), MouseMoveZ ( ) DBPro equivalents?

Author
Message
Icerion
2
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 15th Aug 2018 16:45
Hi! Is there a way to create an equivalent version of MouseMoveX ( ), MouseMoveY ( ) & MouseMoveZ ( ) from DBPro? I would like to use this in my code.

Thank you very much!
Bengismo
2
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 15th Aug 2018 16:55 Edited at: 15th Aug 2018 16:55
https://forum.thegamecreators.com/thread/221956

You can compare the mouse position to the position it was in the previous frame to get the amounts moved.
Icerion
2
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 15th Aug 2018 17:31 Edited at: 15th Aug 2018 17:36
Hi, @Bengismo : Does this work correctly for you? How would I "GetPointerZ ( )"? And if not, please tell me how to fix? ::



Thanks!
puzzler2018
User Banned
Posted: 15th Aug 2018 20:32 Edited at: 15th Aug 2018 20:35
You can use



To get 2D coordinates in 3D space

The pzRaw# variable in here is your Z coordinate

But its is more to do with Get3DVectorX,Y,ZFromScreen commands - where MyX and MyY is the current mouse pointer position using GetPOinterX(), GetPOinterY() commands

pxRaw# = Get3DVectorXFromScreen(myX,myY)
pyRaw# = Get3DVectorYFromScreen(myX,myY)
pzRaw# = Get3DVectorZFromScreen(myX,myY)
Bengismo
2
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 15th Aug 2018 21:37 Edited at: 15th Aug 2018 21:38
This code works fine and produces results the same as DBPro's versions





and Puzler ?? The mousemove commands simply return the difference (mouse delta) of the x and Y position moved. The mouse Z is the mousewheel movement. So while the mouse is still the numbers are zero and when its moved they give the distance moved since the last call to this function.

They have nothing to do with 3D, raycasting or screen vectors.
Icerion
2
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 15th Aug 2018 21:39
Thanks alot for the help, guys! I really appreciate it!

Cheers!
Golelorn
3
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 15th Aug 2018 21:39 Edited at: 15th Aug 2018 21:50
I am not sure what mousemove in DBPro does.

But here is an example code I use to get mouse movements from the last frame as Bengismo suggested.
g_startz#
g_startx#
g_scroll_timer#
need to be globals or just be better at writing functions than me
puzzler2018
User Banned
Posted: 15th Aug 2018 21:42
ill keep my blooming gob shut and just stick with minecraft work - its obvious i dont know what im truly talking about
Icerion
2
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 15th Aug 2018 21:43
@puzzler2018 : What? I thanked you for all the help. Did you read above?

Thanks again!
Golelorn
3
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 15th Aug 2018 21:46 Edited at: 15th Aug 2018 21:47
Yes, you do.. I only added my opinion, because everyone has a different learning style, and options aren't a bad thing. Plus, I am drunk and bored.

Not everyone is able to interpret another person's code. I am just not smart enough, dude. I didn't get what you were writing. Not a reflection on you. I am just a stubborn, dummy. Truly, I am just not smart enough. No disrespect intended.

edit: I think we all posted at once... its a good thing to have so many people active
puzzler2018
User Banned
Posted: 15th Aug 2018 21:51 Edited at: 15th Aug 2018 21:57
Please dont panic - Im a yorkshire man too so I get it - Yorkshire man are normally fighters to be winners.

Im happy Bengismo sorted you out

puzzler2018
User Banned
Posted: 15th Aug 2018 22:12
Had enough - Bengismo - Im fed up of you telling people are wrong in their coding. I would like to see something that you personally create by Xmas and put all this into action - I think Xmas (6 months) is a good time for you to make something
that seem to put people down by,

I have trusted sources of my code and works very well

Whats your story


puzzler2018
User Banned
Posted: 15th Aug 2018 22:13 Edited at: 15th Aug 2018 22:14
Never mind what your story is, if your too bothered in "correcting" peoples code, then make a game

I sincerely dont like smart arses
Bengismo
2
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 15th Aug 2018 22:23 Edited at: 15th Aug 2018 22:25
Puzzler ...Whats your problem??

The question was:
How to get MouseMoveX ( ), MouseMoveY ( ), MouseMoveZ ( ) DBPro equivalents?

The DBPro functions are well documented
http://dbprohelp.wikia.com/wiki/MOUSEMOVEX

They give the amount the mouse has moved.

You decided to answer a different question. Im guessing you though those functions moved something in 3d?? He didnt ask how can i move objects in a 3d space. Then you got your knickers in a twist about it.

I never said there was anything wrong with your code. You just decided that the mousemove functions did something different from what they actually do.

I get paid well for writing code for a living and dont feel any need to impress you in anyway. I work on C code all day and enjoy it - not 'games' but real life embedded code. Frankly you are behaving quite childish and need to realize that this is just a forum where people can help each other. Im just answering questions and dont need hasle from someone who didnt understand the question. Its a bit pathetic reacting like this to someone answering a question and trying to help others.
puzzler2018
User Banned
Posted: 15th Aug 2018 22:25 Edited at: 15th Aug 2018 22:29
Just be more subtile - Like I wouldnt do this this way - but I would do it this way.

It hurts when ones are toally wrong.. we are trying ok.

Just give up stop trying to put people down in their code - they are leaning,,, Puting people down is not a good idea- you have prooved your skills, dont waste that knowledge

Be helpful rather than telling someone is wrong

Kudos to you to know it all
puzzler2018
User Banned
Posted: 15th Aug 2018 22:39
Peace...
puzzler2018
User Banned
Posted: 15th Aug 2018 22:47
smart alecks is my problem and especially ones that tells ones that are wrong - even though they are not.

Thats the problem.. Be more friendly hey
puzzler2018
User Banned
Posted: 15th Aug 2018 22:49
Its seems you know how to programme and well bengismo or who ever you are. All i ask is stop putting people down
puzzler2018
User Banned
Posted: 15th Aug 2018 22:54
Go make a fantastic game that seems to be within your knowledge and up there with skills. and stop teaching us, cause your a good teacher and a bad one at the same.

We are all beginners here - not futurstic Rockstar programmers

Icerion
2
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 15th Aug 2018 23:04
Please stop fighting in my thread.

Thanks alot! =)
puzzler2018
User Banned
Posted: 16th Aug 2018 00:09
Im fighting with myself - stop panicking - you got your answer to what you wanted - move on

c0d3r9
AGK Developer
2
Years of Service
User Offline
Joined: 2nd Oct 2017
Location:
Posted: 16th Aug 2018 09:01
Btw. there is an edit button for editing the own posts.
Phaelax
DBPro Master
17
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 24th Aug 2018 17:37
Don't know if anyone mentioned this or not, but for mouseMoveZ() in DBP you have GetRawMouseWheelDelta() in AGK.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Login to post a reply

Server time is: 2020-09-24 23:20:08
Your offset time is: 2020-09-24 23:20:08