Odd problem reading the mouse (NOT the move/drag problem)
by John Haren · in Torque Game Builder · 04/04/2006 (11:02 pm) · 4 replies
Hello all,
Strange problem I'm having. In short, neither the t2dSceneWindow.getMousePosition() function nor the t2dSceneWindow::onMouse[x]() callback are working for me:
* getMousePosition always returns the same x, y coords even though the mouse is sending x and y axis delta values (this is when I bind the mouse to a custom callback).
* onMouseMove (or down, or whatever) is simply never invoked, although the t2dSceneWindow object is valid. This has been verified with trace().
I've been asking Professor Google for some kind of clue, but so far, no dice. Anyone seen this before?
Strange problem I'm having. In short, neither the t2dSceneWindow.getMousePosition() function nor the t2dSceneWindow::onMouse[x]() callback are working for me:
* getMousePosition always returns the same x, y coords even though the mouse is sending x and y axis delta values (this is when I bind the mouse to a custom callback).
* onMouseMove (or down, or whatever) is simply never invoked, although the t2dSceneWindow object is valid. This has been verified with trace().
I've been asking Professor Google for some kind of clue, but so far, no dice. Anyone seen this before?
About the author
#2
I'm playing in the 2D Strategy tutorial and I am also not getting any of the mouse callbacks invoked.
Interestingly, however, if I call GetMousePosition from the console it does give different values as the mouse is moved.
04/08/2006 (8:13 pm)
I am seeing almost exactly this same behaviorI'm playing in the 2D Strategy tutorial and I am also not getting any of the mouse callbacks invoked.
Interestingly, however, if I call GetMousePosition from the console it does give different values as the mouse is moved.
#3
I'll ask Matt to take a look at the tutorial on Monday.
04/09/2006 (5:34 am)
I need to check to confirm, but I think mouse events are handled differently in the beta 2--more cleanly, in that you can have objects receive callbacks from the mouse directly instead of through the sceneWindow if you like.I'll ask Matt to take a look at the tutorial on Monday.
#4
04/10/2006 (9:43 am)
Well, updating to beta 2 has cleared up the problem, at least for me. But thanks for checking!
Torque Owner John Haren
The plot thickens...