FORUMS: list search recent posts

rotate

Just the Tip (a new set of mini-tutorials for After Effects) - Rolling a ball using Expressions

I'm currently prepping a much larger series of tutorials, but to take a break from those, I've also be creating a series of short tutorials for the things I go back to again and again - but not so frequently that I have them memorised. I find myself searching the internet (and the Cow of course) for these tips, but then often have to wade through a 30 minute tutorial - just to find that one thing... that one trick. Well, these mini-tuts are built for that purpose. I hope you find them useful.

This tutorial uses an expression to calculate how much a circle / image should rotate based on its horizontal position. I've then adapted the expression slightly to help you roll 3D objects too.




--------------------------------------------------------------------------------------
Expressions:

2D Layer
diameter=width;
pi=Math.PI;
circumference=diameter*pi;
rot=360/circumference;
Xpos=thisLayer.transform.position[0];
scalePercent=thisLayer.transform.scale[0]/100;
rot*Xpos/scalePercent


CC Sphere in one dimension:
diameter=effect("CC Sphere")("Radius")
pi=Math.PI;
circumference=diameter*pi;
rot=360/circumference;
Xpos=thisLayer.transform.position[0];
scalePercent=thisLayer.transform.scale[0]/100;
rot*Xpos/scalePercent


CC Sphere coming towards camera:
diameter=effect("CC Sphere")("Radius")
pi=Math.PI;
circumference=diameter*pi;
rot=360/circumference;
Xpos=thisLayer.transform.position[0];
scalePercent=thisLayer.transform.scale[0]/100;
rot*Xpos/scalePercent*-1

Project file: http://bit.ly/2ZtSDn6

-------------------------------------------------------------------------------
Twitter: https://twitter.com/ShiveringC


Posted by: Graham Quince on Oct 12, 2019 at 3:39:27 pm after effects, expressions, rolling, roll, rotate



Here you'll find a bunch of tutorials for using After Effects (mainly). I have a YouTube channel, called ShiveringCactus (long story - not funny anymore) where I post the videos.
© 2019 CreativeCOW.net All Rights Reserved
[TOP]