FlxSprite is moving somehow
I've faced to a strange behaviour from single FlxSprite. I am adding the sprite to my state:
sky = new FlxSprite(0, 0, AssetPaths.sky__png);
And nothing more I do with this sprite!
About one time of a 100 this sprite slowly moves to the bottom-right... I traced its properties and found out that acceleration has the value (x: 1 | y: 1) instead of (x: 0 | y: 0).. But why?? I do absolutely nothing with this particular sprite. Anybody noticed similar issues?
All haxeflixel libs are git-latest.
I added the other sprite instead of "sky" and it moves as well... Also strange FlxSprite is always the first added to state in code.
I believe that the default scroll factor is set to 1. Try this...
Space Castle is a free retro style platformer game with a mystery storyline and made using the haxeflixel library.
@galoyo Yes, it is. But I never use camera moving or scrolling.
scrollFactor.set(0, 0);and I have the same behaviour sometimes: still sometimes acceleration is set as (1, 1). I can manually set it to (0, 0) but curious why it happens at all.
Any chance you're calling
FlxPointthat is still in use somewhere?
@Gama11 No, but I found out this only happens in FlxTransitionableState when transition begins before previous ends or near. Trying to reproduce now in empty project..
Ok, I've reproduced this. Happens always after restart (R button).
I assumed it happens because of Actuate does not end the tween. And maybe FlxTransitionableState involved too. But why completely different sprite is moving?