Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I want to get touch coordinate in onManageUpdate() method. So how to perform that one?

Because onSceneTouchEvent method simulation is some what slow so I could not able to get each coordinate in move event. So to achieve each coordinate in move event I want this functionality.

So someone please help me in this.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

This is not possible, because these events happen in different threads. You would have to rewrite the Engine itself. But AndEngine pauses the UIThread for a specific time after each event and that might be causing your problem. Try setting the interval:

    engineOptions.getTouchOptions().setTouchEventIntervalMilliseconds(faster);

The default value is 20.

share|improve this answer
    
Thanks for your reply. I already know this thing directly not possible but I want some coding trick so I can achieve same result. I will check this thing for performance point of view and reply back to you with what I can achieve. –  Siddharth Jun 1 '13 at 13:15
    
Yes I get some what improvement in retrieving touch coordinate so I mark it as correct. –  Siddharth Jun 4 '13 at 17:31

If you want to get very fine distance coordinates points then you should use DDA Line algorithm to get all point between two touch points. It will give you very short distance coordinates points (depends on you ), though you get two consecutive points at far distance (No matter).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.