ScreenTransform horizontal
hi every one
im trying to move a screen image inside the ScreenTransform horizontal
but when the move start its just moving every where in the screen (up down right lift)
i want the move online inside the ScreenTransform horizontal (right and lift only )
i tried :
// @input Component.ScreenTransform screenTransform
// @input Component.ScreenTransform screenTransform2 // Check if a touch starts inside the ScreenTransform script.createEvent("TouchStartEvent").bind(function(eventData) { var touchPos = eventData.getTouchPosition(); if (script.screenTransform.containsScreenPoint(touchPos)) {// Move the ScreenTransform to match the position of touch events function onTouch(eventData) { var touchPos = eventData.getTouchPosition(); var parentPos = script.screenTransform2.screenPointToParentPoint(touchPos); script.screenTransform2.anchors.setCenter(parentPos); } script.createEvent("TouchMoveEvent").bind(onTouch);
} });
i just dont know how to make the move only inside the first screenTransform
horizontal
thank you
Hi Just Me,
Take a look at the answer that I posted in your original thread. https://support.lensstudio.snapchat.com/hc/en-us/community/posts/360050330351/comments/360007502272
Let me know if you need any other clarification.
Cheers,
Jonathan