0 Favourites

How do I simulate a force like a bow string by fast clicking

  • Hi all!

    Here is what I would like to achieve :

    I have a square on the left of the screen and I would like to move it to the right more and more by clicking fast on my mouse button and if I stop clicking it comes back to its initial position. But the more it moves to the right, the faster I need to click until it becomes alsmot impossible to move it further.

    Just like the string of a bow that becomes harder and harder to pull.

    If I slow down the clicking the square should lose ground and if I completely stop clicking it comes back completely to the left.

    I imagine that maybe I should count the number of time I click on the mouse per second and let's say if I click 5 times per second then my square is at 50% of the width of the screen but if I click 6 times per s then it reach 60% of the width. Or maybe it's possible to do that with physics to have a more realistic feeling?

    Thanks for any help!

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)