Forum rules - please read before posting.

Simple 2d character movement ONLY along the x-axis

edited August 2014 in Technical Q&A
Hi guys,

I want to implement a simple 2d character movement only along the x-axis, similar to the way Machinarium works.
So even if the player clicks along the y-axis, it will only take the x parameter and move my character along the x-axis only. No movement along the y-axis at all.

I still want it to be a point-n-click game controlled with the mouse.

Thank so  much for your help.

Comments

  • This is simple in Direct mode, but for Point and Click it's a bit more fiddly.  Assuming your in Unity 2D mode, try making your PolygonCollider very thin, vertically, so that the Player can only move left and right any noticeable amount.

    Occasionally your Player might still face up/down (e.g. when turning).  If you're using Unity Sprites as your animation engine, you'll have to assign left and right sprites for your up and down directions (e.g. Idle_L is the same sprite as Idle_U).

    On the other hand, Sprites Unity Complex can be used to give full control over your Player's Animation Controller.  You can limit animations to only left and right based on the "Direction" integer that AC outputs.
  • Thanks so much, Chris!

    I will try it out!
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.