Forum rules - please read before posting.

Followed the tutorial, character does not move properly.

Hello, I'm new to AC, currently following the tutorial here:
https://www.adventurecreator.org/tutorials/making-2d-character

I created a character following all the steps, but when I test the game my character position isn't correct. It's pivot point doesn't stick to the clicking position, and it often move out of the zone:

I believe I set the pivot point correctly:

What did I do wrong? :neutral:

Comments

  • Welcome to the community, @Wslie.

    For the character's position to appear correctly, two things need to be true:

    1. The "Pivot Point" of the sprite asset needs to be around the character's feet (though this'll be true by default of the assets you're using).
    2. The child object that contains the sprite renderer needs to have a local Position value of 0,0,0. That is, the sprite object, and the character's root object, should be at the same place.

    The speaker icon in the Scene window in your screenshots represents the AudioSource on your character's root - this is where the character's feet should be. If you select your sprite child object and give it a position of 0,0,0, then the two objects should match up.

    At runtime, AC will position the character at the scene's Default PlayerStart - you don't need to position them manually over it while in Edit mode.

  • I fixed the problem by changing everything to 0,0,0, thanks. :)

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.