Enemy Moving In The Wrong Direction

Discussion in 'How Can I...?' started by Chris_lee, Sep 25, 2017.

  1. Chris_lee

    Chris_lee Boxer

    Joined:
    Jul 17, 2017
    Messages:
    13
    Likes Received:
    1
    Hey guys,

    I know this is an easy one, But I can't figure out why my enemy is moving in the wrong direction. I want him to walk towards the left of the screen but he keeps walking to the right? I've attached some screenshots, Also not sure what the green arrow represents, But I have a feeling it has something to do with it.


    Can anyone help?


    Thanks so much!
     

    Attached Files:

  2. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    Green arrow has nothing to do with it. That is about how your character can cross through the object (like if the collision shape wouldn't be there).

    To make your enemy move to the left put a minus to the linear velocity. It should be -3. You are confused about the two spaces to put a number in, but the one at the right side after the ~ sign is how your velocity you put at the left changes randomly. So if you put on the left -3 and at the right empty. Your enemy always will move at a -3 speed. But if you put at the right 1, your enemy will randomly move at different speeds between -2 and -4. It's a variable from your speed set on the left. Hope that helps.

    If you have more problems like that I recommend to watch all the tutorials available here: https://www.buildbox.com/tutorials/
    This will get you on the right track.
     
  3. Chris_lee

    Chris_lee Boxer

    Joined:
    Jul 17, 2017
    Messages:
    13
    Likes Received:
    1
    Thanks so much for the help, that worked!
     
    Christoph likes this.

Share This Page