iT2D 1.4.1 - SceneWindow2D onMouseDragged events are reported as onMouseDown - NOT A BUG
by Andy Proctor · in iTorque 2D · 07/18/2011 (8:10 am) · 4 replies
Already logged as ITGB-159 improvement
Build: 1.4.1
Platform: iOS 3.x+ (iOS Simulator and devices)
Target: iOS devices and simulator. It does NOT happen under Windows.
Issues: In a project using mouse events, if a handler for SceneWindow2D::onMouseDragged is implemented, it is never invoked when dragging your finger on the screen. Rather, onMouseDown is incorrectly invoked.
Steps to Repeat:
1. Create an empty project.
2. Implement handlers for sceneWindow2D::onMouseDown and onMouseDragged (just put an echo statement in each).
3. Build for iOS device or iOS simulator and run.
4. Drag your finger (or mouse on simulator). You will see each movement in the output console as "onMouseDown" instead of "onMouseDragged".
It does not appear to matter whether the multi-touch setting is enabled or not.
Build: 1.4.1
Platform: iOS 3.x+ (iOS Simulator and devices)
Target: iOS devices and simulator. It does NOT happen under Windows.
Issues: In a project using mouse events, if a handler for SceneWindow2D::onMouseDragged is implemented, it is never invoked when dragging your finger on the screen. Rather, onMouseDown is incorrectly invoked.
Steps to Repeat:
1. Create an empty project.
2. Implement handlers for sceneWindow2D::onMouseDown and onMouseDragged (just put an echo statement in each).
3. Build for iOS device or iOS simulator and run.
4. Drag your finger (or mouse on simulator). You will see each movement in the output console as "onMouseDown" instead of "onMouseDragged".
It does not appear to matter whether the multi-touch setting is enabled or not.
About the author
#2
07/18/2011 (9:13 am)
Rennie, thanks for the workaround. But IMHO this should still be classified as a bug. Games needing just simple "single touch" input should be supported via correct mouse emulation (as 1.1 did nicely).
#5
07/18/2011 (7:07 pm)
I am not sure the technical reason. It may be due to multiple (or the potential of...) multiple windows. Anyhow, it works fine using the iPhoneTouch Commands. I am sure there is an explanation somewhere in here (forum).
#6
Already logged as improvement ITGB-155
07/18/2011 (7:27 pm)
I can clarify that this is not a bug. This is intended behavior, as rennie said. The engine is doing exactly what it was programmed to do, but that does not mean it is ideal. If you look at THIS THREAD, you can see I am rectifying this. Already logged as improvement ITGB-155
#7
07/18/2011 (8:13 pm)
onMouseDragged is such an important feature. I don't understand why it was taken out and not get replaced with another drag function. That plus bugs, features that takes years to add, new datablock system (me no like), and no backward compatibilities is why I'm still using a modified iTGB 1.2. I do still encourage Torque to keep updating the engine and for new users to use the latest iTGB, though.
#8
The thread I linked to earlier is a breakdown of the old input system and how it is improving. Dragging is returning, but not the way it was before. In fact, the input system has been revamped to be much more robust and easier to understand.
I hear what you are both saying and I have been knee deep in the guts of iTorque 2D to resolve it. Check out the second page of Improved iT2D Input to see my progress.
Regarding the level datablock system, I am also improving that as well. The system is going to stay in place, but I have improved the GUI (multi-selection remove, organized by type, hiding, etc) and I'm looking into a partially automated process.
As for backwards compatibility, I wish I had better news. 1.5 is definitely busting a lot of systems, which can't be helped. I polled the community on several features and based on their feedback, I had to start breaking compatibility.
07/18/2011 (9:25 pm)
@Johnny - I ranted a little bit in IRC today (shocker) about the current touch to mouse input system. I found the exact lines of code that led to onMouseDragged being removed and why you get non-stop onMouseDown events when dragging. I was a little frustrated at what I saw, but I understood why it occurred. As I said in my last post, this is going to change.The thread I linked to earlier is a breakdown of the old input system and how it is improving. Dragging is returning, but not the way it was before. In fact, the input system has been revamped to be much more robust and easier to understand.
I hear what you are both saying and I have been knee deep in the guts of iTorque 2D to resolve it. Check out the second page of Improved iT2D Input to see my progress.
Regarding the level datablock system, I am also improving that as well. The system is going to stay in place, but I have improved the GUI (multi-selection remove, organized by type, hiding, etc) and I'm looking into a partially automated process.
As for backwards compatibility, I wish I had better news. 1.5 is definitely busting a lot of systems, which can't be helped. I polled the community on several features and based on their feedback, I had to start breaking compatibility.
#3
Already logged as ITGB-159 improvement
07/19/2011 (6:19 am)
Sorry guys. We were transitioning to the new host and lost some posts. Do I need to recap my replies to explain why this is not a bug and how the new input system is going to resolve this?Already logged as ITGB-159 improvement
#4
Glad to hear you're working on a new & improved input system. It sounds great. But I wish it hadn't broken the original input system. Also, we now have to write platform-specific code just to support simple drag functionality where previously that wasn't required.
07/19/2011 (7:37 am)
No need to explain again, I understand. But it is a bug to me. It was something that was working in 1.1/1.2 but stopped working in 1.4 (no matter what the reason).Glad to hear you're working on a new & improved input system. It sounds great. But I wish it hadn't broken the original input system. Also, we now have to write platform-specific code just to support simple drag functionality where previously that wasn't required.
Torque Owner rennie moffat
Renman3000