Jump to content
Search Community

Detect chosen item in fortune wheel

longnt80 test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I want to make a fortune wheeler game where user can click the button to spin the wheel then when it stops, it will show what user get.

 

I create the function to spin the wheel but not I'm sure which approach to detect which item is chosen. Can someone give me an idea how to approach this?

 

Thanks a bunch!

See the Pen rGRRMb by longnt80 (@longnt80) on CodePen

Link to comment
Share on other sites

1 minute ago, longnt80 said:

There is still a different between those values. But I just figured out that it was because of the timeScale tween I applied on the timeline. This is interesting.

 

Ah, yes. You're tweening the timeScale to 0, so the timeline animation will actually never reach the value you set because it's effectively paused when the timeScale is at 0.

  • Like 2
Link to comment
Share on other sites

  • 1 year later...
  • 6 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...