Answers

  • rhinokeyrhinokey Member Posts: 158
    well i'm a total noob but heres what i would do, make a actor wiht circle collision, and a knob image

    make it respond to touch theres a lot of tutes on this, i'm not sure iff you can make it turn with circular movements, may have to swipe at one side to make it work.
    then in game make a interger, called volume and set a rule that says actor rotation 0-10 degrees sets volume to 1, 11-20 set it to 2 (i didnt do the math to see how many divisions it would take to come out even but whatever)

    then in your music playing rule you can have it look at the volume interger atribute

    thats pretty loose but its how i would look into figuring it out
  • diegocsdiegocs Member Posts: 531
    Thanks for the answer but actually I only need to make the same mechanism as the volume knob (it's not going to control volume)
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Create 3 self attributes, all interger. Call them startRotation, startAngle, and newAngle. Or something like that.

    Then have a rule when touch is pressed:

    -change attribute startRotation to self.rotation

    -change attribute startAngle to vectorToAngle(mouse.position.x-self.position.x,mouse.position.y-self.position.y)

    -constrain attribute newAngle to vectorToAngle(mouse.position.x-self.position.x,mouse.position.y-self.position.y)

    -constrain attribute selfRotation to startRotation+(newAngle-startAngle)
Sign In or Register to comment.