Forum rules - please read before posting.

Animation 2D is not playing as it should

Hello,

I am making a 2d platform game but I am having some small issues.

  1. My animations are not going as it should. I put the idle and walk in the Animator, but it doesn't read, its just play the idle forever. However, if I put none in the ''facing directions'' space, it plays for one side (left or right) but it doesn't mirror the other side, so it just goes left and idle.
    I tried to make transitions but it was no good, and in the AC tutorial ''Making a 2d character'' site it says:
    ''Don't worry about transitions, or which animation clip is the default. With 'Sprites Unity' animation mode, animation playback is automatic'', so I must be doing something wrong.
    I also tried the ''facing direction custom'', nothing changes.
  2. the player is not falling hard enough, its supposed to fall on the platform fast and walk only in the platform, but it walks in all directions without gravity.

https://drive.google.com/file/d/1BUJxcVJ_9ZadvKJUcx-yH2OniLeB7oZ4/view?usp=sharing
I use the v1.73.8 AC, direct movement method.

Comments

  • My animations are not going as it should.

    You don't need transitions, but you do need the names of your Animations inside the Animator to match up with what AC expects - see the "List expected animations?" foldout in the Player Inspector.

    If you set "Facing directions" to "None", then AC will expect a single idle and walk animation - with no _L, _R etc suffix. It won't account for which direction you're facing. Enable left and right directions if you want the character to play different animations based on which direction they're facing.

    it walks in all directions without gravity

    Your Rigidbody 2D is set to Kinematic, which means it won't fall due to gravity. You'll also need to use the Player: Constrain Action to prevent the ability to move in the Up and Down directions.

    Do bear in mind, though, that AC is not a platform engine. If you're looking to make use of tradtional 2D platform mechanics e.g. jumping, you will need to make use of a custom motion controller or third-party platform asset and integrate it with AC's motion system - see the Manual's "Custom motion controllers" chapter for more on this topic.

  • edited July 2021

    Hey Chris,
    So I change the kinematic for dynamic and it works. I increased the gravity scale to 7 and now it falls hard.
    I also put 'my new player' in the standard animations 2d as the sprite child, and now it walks! :smiley:
    I only have a square with a box collider in the ground and it works for now.
    Did I did something wrong? I turn off the navmesh, and didn't put any custom script yet. ( and honestly I will do anything to avoid writing codes :cold_sweat: )
    Its a platform game, but its not like mario, its more like a puzzle game.

    https://drive.google.com/file/d/1kcyyLJvs56Jq704t2zH7IkdSxiEVakUZ/view?usp=sharing

  • edited July 2021

    It really depends on what exactly you're trying to do.

    Now that the character falls and moves left/right, what is the actual problem you're now facing?

  • now everything is good. Thank you so much for your help.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.