After Effects: Dynamic Auto Rotate & Look At Expression

Поделиться
HTML-код
  • Опубликовано: 5 янв 2025

Комментарии • 25

  • @BobShurunkle
    @BobShurunkle 8 месяцев назад +1

    i enjoy coming back to your tutorials for quick and clear refreshers on 'how to'. years late, but thanks, as always

  • @ProdiJayMusic
    @ProdiJayMusic 2 года назад +1

    ahh, vinhson bro! my name was j2murada back then. i randomly decided to check up on how my youtube homies back in 09 were doing. i see you're the only one that's video editing passion/fire never burnt out. glad you're doing well bro.

  • @matcanloi
    @matcanloi 2 года назад

    And he is back!

    • @CreativeDojo
      @CreativeDojo  2 года назад

      Cranking out 2 videos a month :D

  • @nathitappan
    @nathitappan 2 года назад +2

    Awesome! Thank you for the great tutorial! Any insight on how to make this work with 3D layers enabled?

  • @majidmiraqae4368
    @majidmiraqae4368 2 месяца назад

    great tut thanks! I have a question about changing colors! If the null close to object and the color will change! how can coiding this?

  • @MasonSStarkey
    @MasonSStarkey Год назад +11

    function lookAtme(fromPt, toPt){
    d = toPt - fromPt
    if (d[0] == 0){
    A = (d[1]>0)? 90: -90;
    } else {
    A = radiansToDegrees(Math.atan(d[1]/d[0]))
    }
    return 90 + ((d[0]>0)?A: 180+A);
    }
    var toPt = thisComp.layer("the layer we want to look at").transform.position;
    var fromPt = transform.position;
    lookAtme(fromPt, toPt)

  • @arn9570
    @arn9570 Месяц назад

    Can this "lookAtMe" expressions acrivated on proximity, like this expressions will active if the shape near to the effector?

  • @CreativeDojo
    @CreativeDojo  2 года назад +1

    Drop a comment below for the RUclips algorithm 🙏🏻

  • @ali_ghorbani_cg
    @ali_ghorbani_cg 2 года назад

    expressions man in youtube ! 😍

  • @markieTee6354
    @markieTee6354 Год назад +1

    Please write down in the description the exact expression. I cant make it work. thanks in advanced

  • @torattorat
    @torattorat 2 года назад

    great. Thnx. Just a short question. I have a 3D element-eye and this has to follow a null. The eye has two radial rotation properties - up and down and left to right. How to approach this problem?

  • @dimitrisdimoulitsas6660
    @dimitrisdimoulitsas6660 2 года назад

    Beautiful Code!
    I guess the calculation if we want to add more than one code is a bit deeper in mathematics.
    Any idea how to do it?

  • @everydaysebra
    @everydaysebra 2 года назад

    Is there a solution for when the lookAt Null and the rotation layer are parented to other layers?

  • @mahicg
    @mahicg 2 года назад

    Wow

  • @oorange6881
    @oorange6881 2 года назад

    A comment for the RUclips algorithm

  • @renkey
    @renkey 2 месяца назад

    THANKS!!!!
    var toPt = thisComp.layer("Circle").transform.position;
    var fromPt = transform.position;
    function lookAtMe(fromPt, toPt){
    d = toPt - fromPt
    //prevent divide-by-zero errors
    if (d[0] == 0){
    A = (d[1]>0)? 90: -90;
    } else {
    //using my trigonometric super powers for good instead of evil
    A = radiansToDegrees (Math.atan(d[1]/d[0]))
    }
    //shorthand for if the X difference is negative, add 180°
    return 90 + ((d[0]>0)?A: 180+A);
    }
    lookAtMe (fromPt, toPt);

  • @cesarrattoni8490
    @cesarrattoni8490 Год назад +2

    I don´t know why this did not work , it kept giving me an error, nonetheless I found this code which works great:
    p1 = thisComp.layer("Start").transform.position;
    p2 = thisComp.layer("End").transform.position;
    v = p2 - p1;
    radiansToDegrees(Math.atan2(v[1], v[0]));