ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Move Objects by defined amount

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Liam Campbell
Move Objects by defined amount
on Nov 1, 2017 at 4:17:21 pm

I need to animate a bunch of different squares around a grid but I want to be able to click and drag the layers and have them snap at a defined increment. For example a square is at position 100,100 and I want to move it up by 2 I want it to snap to 102,104,106 as i drag it.


Return to posts index

Andrei Popa
Re: Move Objects by defined amount
on Nov 1, 2017 at 4:24:21 pm

I don't know of a quick solution, but maybe you could adapt this guys preset Zack's https://zacklovatt.com/snapping-to-hex-grid/

Andrei
My Envato portfolio.


Return to posts index

Dan Ebberts
Re: Move Objects by defined amount
on Nov 1, 2017 at 5:27:33 pm

Something like this maybe?

grid = 2;
[Math.floor(value[0]/grid),Math.floor(value[1]/grid)]*grid


Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]