Move Sprite to target on a curve/spiral path

  • Hi All,

    Is their a semi easy way and preferable using easeTween to move a sprite to a target but on a curve/spiral path. Like bejweeled butterflies do when moving to score

    Subscribe to Construct videos now

    I was thinking I could offset the Y and X by every tick while easetween progress is less than 1. Tried this:

    Sprite EaseTween progress is between 0.1 & 0.5 | Sprite.X or Target X = Sprite.X + (1*(Sprite.EaseTween.Progress*10))
    Sprite EaseTween  progress is between 0.5 & 0.9  | Sprite.X or Target X = Sprite.X - (1*(Sprite.EaseTween.Progress*10))
    

    Didn't work.

    So has anyone else got a solution?

  • I wouldn't exactly say that was a curved path....its two separate movements..once they start moving they touch the score HUD then move down to the other box HUD...

    Tweening can be done ..even manually like you attempted..you were on the right track for manual tweening.

    Try 'moving' your object to the co ordinates but stop short by say 20 or 30 pixels, then do some micro adjustments to close the gap..

    Also those butterflies look like they have a slight 'sine' function on them for added movement variation...both horizontal and verticals ..

    Try adding those behaviors also and toggling their values at each movement call...

    I use sine behaviors for nearly all butterfly or movement tweening ..if you tweak it just right you can get some fantastic smooth movements and random variations....:-) :-) hope that helps...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Its pretty easy with a variable.

    He has the groups thing, haven't investigated it much tho.

    Note: you could do the same thing with Rex's move to plug.

    example

  • Ta Guys, the sine behaviour was the ticket. I wanted a flick at the beginning of the trajectory, and using Sine allowed me to do this.

    newt that's great example, I thought to use a var to change target :)

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