Expression Library

Flying Kite

Author: Rick Gerrard

Allows you to create a flying object, in 3D space, tethered to a string. Just add some wiggles to the kite layer for additional realism.

Code Sample

Hover over the code and click the copy button.

					String layer scale

point1 = position;

point2 = thisComp.layer("Kite").position;

L = length(point1, point2);

w = thisLayer.width;

r = L/w*100;

[r, value[1], value [2]]

String layer orientation 

t = thisComp.layer("Kite");
l = thisComp.layer("String");

fromPoint = l.position
atPoint = t.position
lookAt(fromPoint, atPoint)

Kite layer orientation 

t = thisComp.layer("String");
l = thisComp.layer("String");

fromPoint = t.toWorld(position);
atPoint = l.toWorld(thisComp.layer("String").anchorPoint);
lookAt(fromPoint, atPoint)