Need help getting sound on swipe?

  • I need one more thing for my game, and its a swipe sound, what i mean is, how do i in the best way, add sound when a player swipes the screen, and how do i control how fast the swipe is? is this even possible?

    TO BE SHORT: Im trying to get a swish sound when swiping the screen , the object is a hammer that has a angle towards the touch, so basicly im trying to get the "swosh" sound from when the hammer moves to to another angle.

    any1 pls?

  • I think you can play the sound when "Touch End".

    If you want to calculate the speed(v).

    You have the distance(S) between 1st position to the last position.

    And the time of swipe by adding dt while touching(t).

    So you will have v = S / t.

    When touch end, you can compare the v with any number X and do the action.

    Cheers.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think you can play the sound when "Touch End".

    If you want to calculate the speed(v).

    You have the distance(S) between 1st position to the last position.

    And the time of swipe by adding dt while touching(t).

    So you will have v = S / t.

    When touch end, you can compare the v with any number X and do the action.

    Cheers.

    Very good , thank you !!Maverick1912

    One thing tho, the game itself will not make the player end touch often, since you have to swipe alot in a circle, any tip on this to make a lasting slash sound effect?EDIT: I used Touch speed ,thanks for the help !

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