Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Pinning an object on the surface of cc Sphere (rotation bug)

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

    Posted by Bruno Po on July 15, 2015 at 7:18 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 = p3*VECN;
    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?
    Thanks!!

    Bruno Po replied 10 years, 10 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy