How do I get a touch effect of sprite button with webgl ?

  • I have lots of of image/sprite button but doesn't have 2 state of image to show the touch effect. Is there anyway i can use webgl shader effects to simulate a touch/click like by reducing the opacity or shrinking or by some other means. I am specifically designing for iOS and Android touch devices.

  • Why would You use CPU intensive webgl for something that can be created in an image editor?

    Especially on mobile platforms it would be wise to try and use as little processing power as you can to optimize your game.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You could also just do something like:

    • On Touched Sprite = Set Opacity to 50
    • On any touch end = Set Opacity to 100

    Although, just adding an extra frame and changing the frame would probably be easier if you have many objects.

  • thanks for the capx, if it's one object it's fine , but i have several buttons (levels dynamically generated) , help button (the object may not be of same type) , how do i know which object i clicked on the Touch End Event to set the opacity back to 100 ? even if i store the UID , i am not seeing if i can pick up the generic objec to set the opacity,

    any help or any other way this can be achieved ?

  • Bump.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)