This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Elias Suske
Posted Feb 01 - Read on Facebook

Hi everbody,

i have two questions, where I didn't found any solution yet:

1) I want to rotate an object via rotationZ, but i want that the sublayers to stay in its original Z-rotation (imagin a circular menu und the text lables should always face the user). Is there an function for that (something like worldRotation …)?

2) I set up an Arduino with an encoder, and i want to stir my FramerStudio-prototype with it. How is this communication possible? Any library? Did anybody make something similar?

Thanks in advance!


Sigurd Tapio Mannsåker

I doubt that there's a built in way to rotate an element without rotating its sublayers, although I may be mistaken. I suppose you could just rotate the sublayers in the opposite direction, either in the same function that rotates the menu or via menu.on "change:rotation"?

Andrew Nalband

The main point of creating a sublayer is to associate it's movements with the parent layer. I would just recommend decoupling them in this case.

Sigurd Tapio Mannsåker

Yup, but if it literally is multiple text labels around a circle, and they need to stay straight while the circle as a whole rotates, rotating them in the opposite way is probably the quickest way to hack it. Either that or get your trigonometry on to animate them in a circle :)

Jonas Treub

The next version of FramerJS will have a new originZ property which will make this way easier. If you try the beta you can already play around with this property.

Elias Suske

Ok thank you guys. I did the hack, its working … good to know that there will be originZ in the future :)

What about the Arduino? Any ideas?

Jonas Treub

Arduinos have software to map inputs to keyboard keys which you can listen for. Never tried it myself but Tom Goijer knows how to do that.

Read the entire post on Facebook