Tracking object movement trouble
by Alkor · in iTorque 2D · 12/04/2011 (8:51 am) · 5 replies
My basic problem is this.
I have a moving object on screen. I added a behavior that when I touch it, it changes color to indicate it is selected. If I let go of the touch the next millisecond it gets deselected and color reverts back to normal.
However, if I keep the finger touched while the object moves away from it, the object is indicated as being still selected.
How can I track that the moving object has left "my finger" or my mouse cursor in the simulator?
I have a moving object on screen. I added a behavior that when I touch it, it changes color to indicate it is selected. If I let go of the touch the next millisecond it gets deselected and color reverts back to normal.
However, if I keep the finger touched while the object moves away from it, the object is indicated as being still selected.
How can I track that the moving object has left "my finger" or my mouse cursor in the simulator?
#2
I don't think that behaviors really can give you that level of control over your touches.
I believe that you are going to need to use the global multitouch functions.
Here's an old thread for reference:
www.garagegames.com/community/forums/viewthread/93467/2#comment-818946
12/05/2011 (11:15 am)
Hey Alkor,I don't think that behaviors really can give you that level of control over your touches.
I believe that you are going to need to use the global multitouch functions.
Here's an old thread for reference:
www.garagegames.com/community/forums/viewthread/93467/2#comment-818946
#3
So if I use global multitouch functions do I need to forfeit behaviors? Behaviors made it easy because when I click on a fish, some action happens ... increases speed and runs away,
12/05/2011 (11:20 am)
This is my "trouble".So if I use global multitouch functions do I need to forfeit behaviors? Behaviors made it easy because when I click on a fish, some action happens ... increases speed and runs away,
#4
12/06/2011 (7:17 am)
@Alkor - I'll see what I can do to rectify the problem you are facing. I tend to use the global touch system for most of my code, but I can see where a "onTouchLeave" would be useful.
#5
12/06/2011 (7:44 am)
Thanks, it would help me alot if this would be working with behaviors.
Torque Owner Alkor
Asurbatal Studios
Can anyone help me? I'm stuck and cannot continue on my project!