"Circle spin throw" rules setup?

I'm want to constrain a ball to a circle and when mouse button is down the circle spins faster and faster. The ball spins with the circle and when mouse button is released the ball fly off the circle. Hope the image makes it clear.

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited November 2016

    Black Circle rule:

    When mouse button is down
    --When Angular Velocity is less than [maximum value]
    ----Constrain Angular Velocity to Angular Velocity+1

    Red Ball rule: (unlocked in scene to access Black Circle's attributes)

    When mouse button is up
    --Move 90° relative to actor, speed=Circle's Angular Velocity * (((Ball's orbit * 2) * Pi)/360)
    Otherwise
    --Constrain rotation to Circle's rotation
    --Constrain X to orbit * cos(Circle's rotation)+ Circle's X
    --Constrain Y to orbit * sin(Circle's rotation)+ Circle's Y

    ('orbit' = distance from Circle's centre to Ball's centre)

  • SocksSocks London, UK.Member Posts: 12,822

    Quick demo attached, mouse button down to spin:

  • GreenfroggGamesGreenfroggGames Member Posts: 224

    That's awesome @Socks ! You're a genius, thanks :)

  • SocksSocks London, UK.Member Posts: 12,822

    @GreenfroggGames said:
    That's awesome @Socks ! You're a genius, thanks :)

    It's a nice mechanic idea, be good to see what you are up to, looks interesting !

  • GreenfroggGamesGreenfroggGames Member Posts: 224
    edited November 2016

    @Socks Yes, got a couple of ideas for this one. Hopefully it turns out as good as I vision it in my mind. I'll post some gameplay later on :)

Sign In or Register to comment.