How do I fix my animations

  • Hi,

    I have my animations set the following way:

    -When 8 direction is moving:

    Player at 0 degrees, animation to right

    Player at 90 degress, animation to down

    Etc

    But if the player is touching a wall, then the animations don't change. Here is a video of the issue:

    https://youtu.be/mRqSGUHPJUY

    What am I doing wrong?

  • I'm not sure what you mean by "Player at 0 degrees"

    Are you comparing : Player.8Direction.MovingAngle ?

  • I'm not sure what you mean by "Player at 0 degrees"

    Are you comparing : Player.8Direction.MovingAngle ?

    Hi!,

    Here is a video of my event sheet. I don't know how to put pictures here <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • why not just set your animation on key press ?

    if key down pressed set animation down

    if key right pressed set animation right

    etc

    ?

  • why not just set your animation on key press ?

    if key down pressed set animation down

    if key right pressed set animation right

    etc

    ?

    I tried that, but if I'm pressing up, and then press right withou letting go up, the player would move up, but the animation would be facing right, and it looks worse than my current situation

  • ok, didn't think of that

    can you change your angle so instead of within 0 degrees of required you change it to within 10 degrees ?

    I will try to have a play and see if I can come up with something... not done much with 8 direction

  • Like I said..

    If you use Player.8direction.movingangle it should work..

    system is within angle : Player.8direction.movingangle is within 5 of 90 - play animation "down"

  • Like I said..

    If you use Player.8direction.movingangle it should work..

    system is within angle : Player.8direction.movingangle is within 5 of 90 - play animation "down"

    But it doesn't... can you take a look at my event sheet and tell me if there is something wrong, here it is

  • It only happens when you're against a wall? Could be your 8-Direction object isn't able to rotate because the corners of it's collision polygon are snagging. Try using LittleStain's suggestion of using the moveangle instead of the object angle, but also turn off Rotate Object in your 8-Direction behavior's properties.

  • Like I said..

    If you use Player.8direction.movingangle it should work..

    system is within angle : Player.8direction.movingangle is within 5 of 90 - play animation "down"

    This was totally the solution. Thank you man, and sorry I didn't understand earlier.

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