InsaneHero Posted October 24, 2013 Share Posted October 24, 2013 If I do this: h = game.add.sprite(0,0, "hospital");h.x = 49900 - h.width;h.y = findGround(h.x + h.width) - h.height + hospitalOffset * 0.5; The sprite will display at 0,0 (top-left of the screen... ignoring the camera location) as a brief flicker before moving to the correct location.I'm guessing this is down to some precalculated transforms which aren't updated by the x,y setters.What function should I call to recalculate the transform to prevent this flicker? (Notice that I can't position it directly because I need the width and height of the sprite which aren't available until after it's been created) Link to comment Share on other sites More sharing options...
rich Posted October 24, 2013 Share Posted October 24, 2013 This should be resolved in the dev branch now. I now run an updateTransform in the render stage, so it should calculate the modified position in time for its first render pass, stopping that glitch you're seeing. Link to comment Share on other sites More sharing options...
InsaneHero Posted October 25, 2013 Author Share Posted October 25, 2013 Thanks Rich, I'm not happy working off the dev branch generally but I can just ignore it until you release the new version. Link to comment Share on other sites More sharing options...
Recommended Posts