How do I reset a sine movement (plugin)

0 favourites
  • 3 posts
From the Asset Store
Run and Jump in 3 Dimensions! Take your platformer to the next level!
  • I want my character to stick to the ceiling and then bob up and down as if dangling from a rubber band.

    I got this to work by making a sine movement active after sticking to the ceiling, and then making it inactive after unsticking.

    But I want the character to start the sin movement at the same point on the wave each time he sticks to a ceiling, so I can control the animation. Now, if you begin by moving up and unstick while in the middle of moving down, you will start the second stick by moving down first.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay, I got it to work.

    I didn't make it swap between active/inactive. It's active all the time. When you are not stuck to the ceiling, period and mag is at 0. When you are stuck to the ceiling, period and mag is at 2.

  • You could also reset the period after you reactivate the behavior ,

    Set period

    Set the duration of a single complete back-and-forth cycle, in seconds.

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