How to get touch position in perspective app on android

Hello there,

I am trying to develop some kind of a virtual joystick for a robotic application. In principle, it should be simple. I just need to obtain the current touch position on the screen to update the position of the virtual joystick and send that to the robot.
Right now, I can easily do that using the onMouseMove event and pageX/Y but I could only manage to make it work in the web browser with a mouse. I need it to be touch based. The onTouchMove would be perfect for what I need but I am not able to obtain the current touch position.
Is there a way to obtain the current touch position?

Thank you

1 Like

Looking for the same thing here. The onTouchMove handler has nothing useful in it :confused:

Two years later, I'm revisiting this topic. Has anyone managed to capture the X/Y positions of touch movements in Perspective?

I'm working on creating an XY coordinate-like container with the ability to zoom and pan, specifically on mobile devices. In order to create a zoom and pan mechanism, I believe I need to know the touch positions, but I'm struggling with this part.

So far, I've managed to implement zoom functionality for mouse scroll events, but translating this for touch events on mobile devices is proving to be a challenge.

Has anyone tackled this issue, or is there another way of approaching this that I may not have considered? :thinking:

Haven't used this yet, but may be of interest?

1 Like

Thanks for the suggestion. It's indeed interesting, and they've done an excellent job creating a container with zoom and pan functionality.

However, because it's a .modl file, I believe we can't peek into how they've implemented the mechanics behind the scenes :thinking: We are aiming to build our own custom container, so that we can tweak it according to our project's needs and also understand the workings better.

Does anyone have suggestions on how we might go about creating a similar feature, or any way to learn from a .modl file?

Decompiling someone's module file to learn from it so you can avoid buying it is not appreciated, and is explicitly forbidden by that module's license. (There is similar language on my module licenses, too.)

You need to learn to do this on your own, or pay BIJC for consulting help, or buy the module and ask BIJC to accommodate your requirements in their product.

Really.

{ There are certain uses of decompiling that are considered fair use, varying by jurisdiction. Your intent isn't one of them, in any jurisdiction I'm aware of. But IANAL, yada, yada. }

5 Likes

Thanks for liking our Zoom Pan Module, it’s taken a year to get the functionality we needed and we thought the community might like to share the features and perhaps a tiny fraction of the cost.

I’d be happy to look at incorporating any requirements you might need if you reach out, we have done this before with our perspective calendar module. I can assure you that it would be more cost effective than starting from scratch.

Building a module like this is non-trivial and I would be distressed for my team if an actor replicated their good work by plagiarism.

7 Likes

I want to assure you that plagiarism is absolutely not my intention. Your Zoom Pan Module is indeed impressive, and my aim is not to replicate it without permission. Your team's hard work is evident in the functionality of your module, and it is not my aim to discredit or undermine that in any way.

That said, I appreciate your offer to consider incorporating our requirements. I'll be reaching out to discuss the possibilities.

2 Likes

Corne_de_Jonge

No worries, thanks for the kind words. I'll look out for an email