ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Pinning an object on the surface of cc Sphere (rotation bug)

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Bruno Po
Pinning an object on the surface of cc Sphere (rotation bug)
on Jul 15, 2015 at 7:18:46 pm

Hi there!

Sorry to bother you guys, I kept searching the forums and the internet for a solution and couldnt find it.

Thing is, I need to make a template for some less experienced users to place icons on top of a map.

After a lot of trial and error, I am far, far away from a basic programmer, I´m just an artist, I made this script.

p1 = transform.position;
p2 = thisComp.layer("CENTRO").transform.position;
p3 = thisComp.layer("ESFERA").effect("CC Sphere")("Radius");
VECTOR = p1 - p2;
VECN = normalize(VECTOR);
DIS = length(VECTOR);
DISR = p3;
DISP + p2

It works, I can duplicate the icons and just move them by dragging and the script snaps it to the sphere.

The thing is, it is on the sphere, but it does not stick to the texture when rotating. I tought I made some mistake on the script, but then to see if it really was the problem, I placed a series of 3D strokes, same radius as the sphere, and it sticks.

Basically the ccSphere plugin is rotating in an undesirable way.

I am using this to rotate the sphere:

value + lookAt(thisComp.activeCamera.toWorld([0,0,0]),position)[0]
value + lookAt(thisComp.activeCamera.toWorld([0,0,0]),position)[1]
value + lookAt(thisComp.activeCamera.toWorld([0,0,0]),position)[2]

Tried to remove the Z axis code, but no luck.

Any ideas?

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 All Rights Reserved