Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions wheel-of-fortune needle collision rotation

  • wheel-of-fortune needle collision rotation

    Posted by Linus Nystrom on April 30, 2014 at 6:54 pm

    Hello all!

    I’m new here, and I have a real problem to tackle.

    I’m animating a wheel of fortune, and I have no idea how to solve the rotation of the needle. The spinning of the wheel is easy, but what I need is for the needle to rotate 90 degrees whenever it hits one of the dots.

    The reason why I need to make an expression is so the needle rotates correctly even when the speed of the wheel slows down.

    Anyone have any idea of how I can solve this?

    Thanks alot!

    Linus Nystrom replied 12 years, 3 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    April 30, 2014 at 7:53 pm

    I think it’s a little complicated. I would think you could animate the needle getting out of the way based on the angle of the wheel. You can set up an equation that repeats for each segment of the wheel (looks like you have 13 segments?) with something like this:

    angle = thisComp.layer(“wheel”).transform.rotation%(360/13);

    Then you could construct your expression for the needle so that it uses the angle calculation to drive the needle’s rotation. The problem is that eventually the needle needs to return to its original rotation, and that animation would happen independently of how fast the wheel was turning. So you would need some type of springy animation to take over after the angle value gets to a certain point. It could be done, but the details depend on the characteristics of your setup.

    Dan

    Dan

  • Linus Nystrom

    May 1, 2014 at 9:26 am

    Whoa. I knew that there was a much smarter way than actually calculating the collision! That single line alone in the rotation field of the needle was enough to make it look ok, and I’m sure with a little tweaking I can make it work with just this! Im not even sure why it works, but it looks good!

    Thanks!

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