clock control effect

0 favourites
  • 8 posts
From the Asset Store
High quality sound effect pack, in the following categories: click, coin, damage, fail, jump, level up,message, shot
  • I'm trying to have a clock hand moving effect but should happpen when the object is dragged, something like a knob or guage control.

    the capx file here depicts what i want, but not by contolling with keyboard, i'll prefer just having to drag the object and then it just moves with the other end being pivoted kind off. I dont know if its possible to achieve this with construct and how?

    capx file here knob

  • Here's a fairly simple way to do it, although there are many other ways. Note, I'm using the touch object here, but you could replace it with the mouse object if necessary.

    Example capx.

  • GeometriX, thanks a lot works perfectly but would appreciate a little explanation on the techniques or concept useed. Thanks

  • Sorry, I usually comment my examples but I was in a bit of a rush.

    So, there are a few ways to do this. The most simple way is with a single event, something like Touch -> Is touching object | Dial -> Rotate 5 degrees toward (Touch.X, Touch.Y).

    But that limits the player to having to keep their mouse/finger on the dial the whole time. I prefer to allow them to initiate the touch while on the dial, but then they can move their mouse/finger anywhere on-screen and the dial will follow the mouse/touch.

    To achieve this, I used a dummy object that is created when the user touches the dial, and is destroyed when they release the touch. But the dummy object will always follow the player's finger, no matter where it goes on-screen, and the dial will always point towards the dummy object, not the finger, which means the player can move their finger wherever they want and the dial will adjust accordingly.

  • GeometriX, i think i get that, thanks a lot

  • Try Construct 3

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

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

    Great tip.

  • <font color=#EB5005>Very creative idea. I conceive that a clock control can be of your help.</font>

  • Sounds like you could also put drag and drop on that invisible object, and when dropped, snap it back to the clock.

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