Getting MT4J to detect multiple touches
Posted: 30 November 2014 05:09 PM   [ Ignore ]
Rank
Joined  2014-11-30
Total Posts:  1
New Member

I want to edit the physics scene such that when a person places two fingers on the circle displayed on the screen it will cause the circle to change color. But I am not sure how to do this. I have a counter that checks to see if this is the first time there has been a gesture processed if so increment the counter else color the object. But I think this is similar to a double tap because the circle gets colored when tapped twice but not when I place two fingers on it.

public boolean processGestureEvent(MTGestureEvent ge{
                    TapEvent recievedTap 
= (TapEventge;
                    
IMTComponent3D targetComponent recievedTap.getTargetComponent();
                    
                    
MTEllipse circle= (MTEllipsetargetComponent;

                    if(
recievedTap.getTapID() == TapEvent.BUTTON_CLICKED)
                    
{
                        
if(counter >0)
                                         
}

How should I solve this problem?

Profile