Forum rules - please read before posting.

NPC sprite renderer sprite changes on play

Hello,

I am new to this forum and have been viewing tutorials and reading other posts, but cant find the problem I'm having. I recently used the character wizard to make my character into an NPC. I used the sprite in his down position as his game object. The issue is when the game-play starts he is in the up position. I would like him to be in the down position at the start of the game if possible. I have tried facing his character in the down position using the action list but it has not resolved the issue.

There was a similar issue on this forum but I was unable to resolve my problem.

Link:https://adventurecreator.org/forum/discussion/4059/npc-will-not-face-correct-way-on-scene-load

I attached photos that may better assist with the problem. Please let me know if you need anything else that could help this situation.

[img]https://i.imgur.com/kWqqTyC.png[/img]

[img]https://i.imgur.com/AY8MlZo.png[/img]

[img]https://i.imgur.com/2ZF0y6f.png[/img]

[img]https://i.imgur.com/dQoSzOS.png[/img]

[img]https://i.imgur.com/p7ECcIL.png[/img]

[img]https://i.imgur.com/hgEEZ3R.png[/img]

Comments

  • Welcome to the community, @Asuna09.

    As I mentioned in the thread you linked to, a character's original sprite in edit-mode has no bearing on what sprite will appear at runtime, as it's then controlled through animation.

    Your ActionList's Character: Face direction should turn the character, but I can't see the rest of the Action chain and can't be sure it's being run. Try moving this to the top of the ActionList so that it runs first, and check Is instant? to have them snap-turn instead of over time.

    Alternatively, you can set their root object's rotation (the "Robert" GameObject) to (0, 180, 0) to have their initial direction be downward-facing.

    If he still doesn't face the right way after that, it may be an animation issue. Check your Console for related messages, and open up his Animator Controller at runtime to see which animation is playing. Based on your Inspector, he should play his "Robert_Idle_D" animation when facing down - does he have this animation present in his Controller?

    I also notice that his "sprite child" object, Robert_Idle_D_0001, has a non-zero local position. You'll need to reset this to (0,0,0), and make sure that his sprite pivot point is by his feet. This is so that his sprite appears at the same position as his root GameObject, which'll prevent issues as he moves around the scene.

    A tutorial on creating 2D characters can be found here.

  • Thank you so much :smile:

    Changing the ActionList's Character: Face direction to run first and checking is instant helped him face the intended direction.

    Thank you for your time and have a good rest of your day.

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.