-
Hey, I'm making a 2D game with sprites. Whenever I spawn a new sprite, it briefly (for 1 frame, presumably) appears at the wrong Transform, I assume at the origin at default scaling. This means that whenever I spawn a new sprite, it briefly flashes in the middle of my screen, before moving into its proper intended place. Does anyone know what causes this and how to avoid it? My best guess right now is it has something to do with the globalTransform being updated one frame later or something. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
It looks like you are spawning a sprite first and then changing its |
Beta Was this translation helpful? Give feedback.
It looks like you are spawning a sprite first and then changing its
Transform
component in a later stage.If you set the transform right when you are setting up the
SpriteBundle
it shouldn't happen.