have found that when i click to spawn stuff into my game, if i am moving the mouse, either in the viewport, or in any other regard (movement of the node ingame)
there is a very good lickly good, of a repeat of the underline code, that results in two instances of the itemes/object spawning in, do wish to hear if any know of this problem, and at best how to fix it
#double repetition of code, in connections to mouse click and movement
4 messages · Page 1 of 1 (latest)
Is the code you have shown in one of the input callbacks? If so it is likely the problem is caused by it getting called twice in a frame, once for the mouse button click event and again for the mouse movement event. Since the mouse button is still showing a just pressed during the mouse movement event the code is still being executed. You could add a check to the first line to see if:
event is InputEventMouseButton
vill look into it when I get a chance (does not currently).
and yes this runs on input(event)