Forum rules - please read before posting.

Side-scrolling character can only move upwards

Hi!

I only just got Adventure Creator yesterday and am having lots of fun learning the ins and outs, however now I've seem to have come to a grinding halt.

I'm trying to set up a scene where a character is only able to move left to right, so I'm using "Sprites Unity Complex" and have set up the animations, bool and integers for "Speed" and "Direction".

The character successfully goes from idle to walking cycle, but my problem is that the character will just fly up in the sky and out of view no matter what direction I'm pressing on the directional keys. In the Animator parameters, I've set "Direction" to 2 by default which should signify right, however as soon as I press play, it goes to 3 suggestion Up and then it stays there completely ignoring keyboard input.

Anyone have a suggestion on how I can get this to work?

I've also set the settings for movement method to direct and input method to keyboard or controller.

Any help would be great!

Comments

  • Welcome to the community, @netto.

    If you don't want to make use of up/down movement at all, you can use the Player: Constrain Action to lock those movement directions.
  • Hi Chris!

    Thanks for the suggestion - whilst I'm sure this will be the solution, is there a good tutorial available on paths in general?

    I can't seem to make it work. I assigned the action list script to the player character, set player constrain and disabled up and down movement but it doesn't seem to make a difference even if I assign a path to it - the player is still able to move in any direction it wants.

    Thanks again!
  • Ah I figured it out by re-watching your 2d tutorial again! My problem was that I hadn't created it in the "ActionList on start Game"

    Thanks again for pointing me in the right direction!
  • @ChrisIceBox is it possible to constrain player movement at horizontal axis while using point and click movement control without modifying AC scripts? I want to implement Silent Age control style:

  • If you use Direct movement, you can use the Player: Constrain Action to prevent vertical movement, but for Point And Click movement, you will need to create a very thin NavMesh instead.

    Once you have movement correct, you may want to change your Player's animation engine to Sprites Unity Complex, as opposed to Sprites Unity with is easier to set up but assumes 4- or 8-directional movement.  Sprites Unity Complex works by affecting Mecanim parameters, so that you can control your animations however you wish - leaving up up and down walk/idle animations, for example.  More info on this can be found in the Manual's Section 3.9.
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.