Prevent sprites from flipping when going up and down.

0 favourites
  • 6 posts
From the Asset Store
Set of tiles to create a map for top-down games with island theme
  • I got the movement down for sprites. Up down, left right. Left to right a sprite is fine. But going up and down, the Sprite flips on its side...I messed around with set angle in the properties and set angle in the code itself, but it always flips when going up and down.

    Set Angle yes gets it to move down, but it's turned on its side.

    Any help would be appreciated.

  • I got the movement down for sprites. Up down, left right. Left to right a sprite is fine. But going up and down, the Sprite flips on its side...I messed around with set angle in the properties and set angle in the code itself, but it always flips when going up and down.

    Set Angle yes gets it to move down, but it's turned on its side.

    Any help would be appreciated.

    Are you using platform behavior or 8 directions? if is 8 direction behavior check its settings at left site were says "angle" and set it to no probably you had the 360 angle

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I am using the Bullet behavior because I want the sprites to move automatically. Might the 8 direction behavior work better?

    I tried set bullet speed to 180 and it moves, but it goes across the screen. Angle is set to no in bullet behavior. I have Simulate press down but it's going across the screen. Simulate press down and it moves to the right. Simulate Down means down...but the sprite moves to the right.

    Now i got rid of bullet, set acceleration and max speed to 180, set Simulate Down and the sprite is just staying in one spot.

    Is there a way with the bullet behavior to make the Sprite so it wont flip when it moves up and down?

    PS: I did set Flipped, now it's still sideways...but flipped. The top down space shooter sprites arent flipped when they're dropping down,t he one that comes with construct 2. What's wrong?

  • Problem solved! I duplicated the Sprite, but rotated the sprite in the Sprite editor 90 degrees to the left.

    Basically, Bullet Behavior set angle is Yes. In the actual code, Set angle to change direction. Make sure you have Bullet speed set.

    0 degrees moves Left to Right

    -180 degrees moves Right to Left

    90 degrees moves Up to Down

    -90 degrees moves Down to Up

  • cool, nice to hear that, well done m8,

  • Yes the "default" direction (angle 0) for any sprite is facing to the right. If you create your sprite facing any other direction to this, then it won't move facing the direction you want it to.

    ~Sol

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