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.

Bug Reports / Funny Mouse/Object Behavior

Author
Message
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 11th Jul 2013 00:44
I've been trying to use PICK OBJECT to move objects along the X and Z axes (for starters) but I was having a problem with the objects "jumping" on the initial mouse click.



It seemed as if mouse movement was being registered when there was none. So I added 2 print lines to monitor the mouse movement, and then the jumping stopped!



Does this make sense?
Does using Mousemove reset/refresh the values or something?

D.D.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 12th Jul 2013 02:58
Quote: "Does using Mousemove reset/refresh the values or something?"


The safe way of doing all this is to read your mouse values once per sync loop and store those values in variables. If you need to use them more than once per loop then refer to the stored values rather than do another function call. Among other things that avoids complications arising from the possibility that the values might have changed between the multiple calls.
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 12th Jul 2013 23:12
Great tip... much obliged!

I probably should have thought of that, but apparently I need to buy a book on common sense.

D.D.

Login to post a reply

Server time is: 2024-03-29 13:01:37
Your offset time is: 2024-03-29 13:01:37