How do I make an object that moves in a square pattern?

0 favourites
  • 2 posts
From the Asset Store
Gravity Square is a game where I aim to reach the square at the polka dot door :)
  • I know how make it move in a circle pattern (by giving the object two sine behaviours, setting the periods to the same values and magnitudes to the same values, but making the offset of one of the behaviours one-fourth of the period) and I tried changing the wave properties of the sine behaviours to triangle, and it did make the movement square shaped, but it was a tilted square, so more of a diamond shaped pattern.

    Any help with this would be nice!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Introduce an instance variable


    _________ | Set SQ_MOVEMENT to floor( Time % 4)

    This will cause SQ_MOVEMENT to be reset 0,1,2,3,0.... infinitely.

    Then give it a custom movement,bullet or use lerp for each state.

    Decide which one you'll use then do this:

    SQ_MOVEMENT = 0 | [Move Right]

    SQ_MOVEMENT = 1 | [Move Down]

    SQ_MOVEMENT = 2 | [Move Left]

    SQ_MOVEMENT = 3 | [Move Up]

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