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

What is Framer? Join the Community
Return to index
Shkodran Arifi
Posted Jan 04 - Read on Facebook

Hi guys, How can I make the rotation speed based on drag force/speed ?

2 Comments

Maksim Okala-Kulak

Can’t imagine better solution, rather then creating a function that would check scroll position every n milliseconds (and/or listen to scroll event) and calculate delta. Then, any another element could be animated based on this number.

Joseph Brick

Hi! You can use velocity.x and/or velocity.y of the onDrag event to get a number that you can apply to rotation. E.g.:

layerA = new Layer
layerA.draggable = true
layerA.onDrag ->
[indent] print Math.abs(event.velocity.x)

Read the entire post on Facebook