multi touch

11 March 2016 14:16
Hy i'm trying to fugure out how to use multi touch in a project. And i am wondering if i could use it in Blend4web?

I for example am wondering if i could check if i'm touching two objects at the same time to trigger one animation.

Thank's in advance!
13 March 2016 10:58
Hi,

Currently, we don't have special methods for precise multi touch processing, so you need to use builtin browser touch events. There is a changedTouches feld in the touch event. It can be used in combination with the pick_object method in the same way as if it was one touch. But go easy on the pick_object, because it is a pretty costly call.
18 March 2016 11:49
Ok. I found a couple of examples. it shouldn't be to bad. Thanks for the advise.
21 March 2016 12:16
Question. When i use the switchselect in the node tree : is it using pick_object under the hood?
21 March 2016 12:31

Question. When i use the switchselect in the node tree : is it using pick_object under the hood?
Hello!
Yeah. Selection sensors are created and pick_object is used in their processing
Blend4Web Team - developer
Twitter
LinkedIn
21 March 2016 13:07
Hello!
So if i understand well. When i need to map a large area i could just check the X and Y of the mouse click and launch a function that would be more efficient than calling pick_object.
In the case for example where i have two navigation objects. If I use viewport alignement they would always be at the same place. so if i determine a max and min X and Y i could simplify my app by checking if i click in a zone on the screen rather than calling pick_object?
Of course it would need a bit of math to recalculate the desired zone according to the viewport size for every device or every time the viewport size changes.
21 March 2016 14:33

So if i understand well. When i need to map a large area i could just check the X and Y of the mouse click and launch a function that would be more efficient than calling pick_object.
In the case for example where i have two navigation objects. If I use viewport alignement they would always be at the same place. so if i determine a max and min X and Y i could simplify my app by checking if i click in a zone on the screen rather than calling pick_object?
Of course it would need a bit of math to recalculate the desired zone according to the viewport size for every device or every time the viewport size changes.
Seems correct
Blend4Web Team - developer
Twitter
LinkedIn
 
Please register or log in to leave a reply.