Hello
I wish to rotate a plugin image by dragging.
Would be like using the draglayer() action, but instead of dragging the plugin around, it would stay where it is and rotate on itself depending on the drag, in x or y.
Could not manage to find a way to modify the draglayer() action to do this...
Is there a way, or another way?
Thanks
rotate by dragging
-
-
Actually as I was giving up I just found this thread where I found a solution:
on my plugin
ondown="set(dragging,true); dragRot();"
onup="set(dragging,false);"<action name="dragRot">
if(dragging,
trace(mouse.x,' ',mouse.y);
delayedcall(0,dragRot());
);
</action>I can use that to set the rotation.
-
Hi,
you could save the current values of the mouse.x, mouse.y variable in custom variables in the ondown event, and then track the changes in the 'dragRot' action and use them to calculate the rotation in any way...
Here a quick example:
https://krpano.com/forum/wbb/../.…ml?html5=preferxml:
https://krpano.com/examples/dragrotation/dragrotation.xmlBest regards,
Klaus -
This is absolutely perfect! Thanks for posting this!!
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!