Touch Radius

SwaggedSwagged Member Posts: 50
edited November -1 in Working with GS (Mac)
i have a sliding panel in my game and when i play my game on my ipod i have to touch the panel really precisely in order to get it moving back and forth. how can i increase the area of where i can touch the panel without increasing it in size?

Comments

  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Make your slider actor have a bigger transparent area around it. Therefore, it'll look the same size but it'll be a bigger touch area
  • SwaggedSwagged Member Posts: 50
    how do i do that?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    make 2 real attributes call them sliderx and sldier y

    in the slider constrain self position x to sliderx and constrain self position y to sldiery

    then make a actor, and set the alpha to zero. Make it the size you want your touch area to be, then in that actor constrain ssliderx to self position x and constrain slidery to self position y

    youll probably need to tweak there or add some other rules for your sldier or touch detecting in the invisible actor, im out the door right now but that'll get u going
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    John by the sounds of it, the slider is already setup, he just wants to keep the slider size as it is visually but have the slider actor register more of a touch. The easiest way is to just add some transparency around the sliding actor
  • entersimonentersimon Member, PRO Posts: 273
    I agree with beefy_clyro. If you just make the image with a larger transparency area and apply that to the actor then you get away from adding RAM usage with constrains.
  • SwaggedSwagged Member Posts: 50
    how do i apply a transparent area, when put a transparent rectangle behind the panel it does not move with the panel however if i move the panel the transparency moves with the panel
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    The slider image needs to have the transparency on that actor, not a separate image, thus, the touch will register a bigger space but as its transparent you wont see how much bigger it is
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    dkhan said:
    how do i apply a transparent area, when put a transparent rectangle behind the panel it does not move with the panel however if i move the panel the transparency moves with the panel

    just switch around what i told you above

    @beefy yeah that would be easiest, but i dont htink hes using a image for his slider. So he cant just make a bigger image and put the piece inside it, he needs the other invisible actor constrained to the sldier
  • SwaggedSwagged Member Posts: 50
    Thank you, i got it to work :)
Sign In or Register to comment.