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

What is Framer? Join the Community
Return to index
Sindu Narasimhan
Posted Jun 20 - Read on Facebook

I have a layer, which should be draggable over a circular path, like this. Im looking for what draggable constraints need to be set to achieve this. Does anyone know of examples that I can reference?Thanks in advance.


Brian Williams

you could get the difference between the starting x position and current position on drag in which ever axis you care about mapping to then you just have to use that value to set the rotation on a parent layout. all the nested children will be rotated relative to its center of rotation.

Not sure if theres an easier way but thats one way

Brian Williams

I was trying to write you some code to do it with trig but I cant figure out how to get to the math library (i.e. cos/ sin functions) ... I should probably google that

Edit: oh wait i was just being an idiot

Sindu Narasimhan

Brian Williams - - I think this is what I am looking for :)

Sergey Voronov

i wrote a module for that, hope u will find it usefull)

Brian Williams

I still think that there are two valid approaches here.

Sergeys method is what I would use if you need to do cross layer transforms ...

(I might update Sergeys function to take a collection/ args... so that you dont have to write multiple method calls :) to do the exact same thing on multiple layers in that case)

Although if its all in the same grouped layer/ object anyway I would do it this way.

Read the entire post on Facebook