Creating a control using Knobman

0 favourites
  • 6 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • Hi all,

    Is it possible to have a draggable rotary control ?

    I have been using this to generate sprite sheet for animation.

    g200kg.com/en/software/knobman.html

    This would be great for all kinds of healthbars/controls etc.

    I am wondering if I can link the mouse x +/- to the animation frames and alter a parameter such as opacity.

    It would presumably have to work with on clicked and drag up/down.

    Any help would be greatly appreciated.

    JKID.

  • You're essentially recreating the wheel with frames since all graphical objects can be rotated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • newt

    Yes your are right, however using Knobman allows for lighting effects etc so that's the reason I would like to get this working rather than rotating a single object.

    I suppose it would be possible to link rotation min/max to animation frames to achieve this ?

    That must be what your implying no ?

    Thanks for your help newt.

    JKID.

  • So do you plan on making 360 frames?

  • Thanks newt

    36 would be enough for 360 changing the frame every 10 I guess although in the case of a pot it would go from -145 to 145 degrees.

    It would be 29 frames I think.

    How would one go about setting this up ?

    I suppose you could increment the frames on a percent basis ?

    I am wondering if this might be a good behavior preset.

    JKID.

  • I'd also seriously recommend against using set frames. Why go through all that hassle for a bit of trickery?

    Using rotation towards a dummy object that uses the drag-and-drop behaviour, you can quickly put together a rotating dial as you can see in this example (taken from a metronome app I made a little while ago).

    For the directional emboss (which doesn't rotate), I used an object with transparency overlaid on the dial. I think the effect is convincing enough, and I imagine you could extend it to some simple lighting effects.

    If you are totally set on the masochistic practice of creating 30-odd frames for your dial, you could create an event to set its animation frame every tick to int(Dial.Angle/10)-1, with the frames loaded up in the correct order and the animation speed set to zero.

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