My Sprite disappears when rotating during play

I am trying to create a 2D top down videogame, I’m currently in the process of setting up the controls and movement. However, I have run into an issue where when I go right or left my character sprite just disappears. I set up some blueprint code that makes it so if the velocity is negative, the sprite rotates 180 degrees on the Y axis so that it faces left when going left. But it just disappears now.

Here is my blueprint:

Here is my viewport set up for the sprite:

Here is my set up for the spring arm:

Any ideas as to why my sprite might be disappearing?

In your code should the default values for rotation be 0, 100, 0? If you leave these values blank it will set the position of your object to be 0, 100, 0. Perhaps setting it to 90, 100, 0 or some other value will work better for you?

1 Like

I realized I wasn’t keeping the -90 rotation on the X axis for my sprite when rotating it on the Y axis in the blueprint code which made it impossible to see the sprite due to it being flipped upwards where the sprite isn’t visible because it’s 2D and the camera is in bird’s eye view. Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.