AngleTween doing the job and then cancelling ?



  • Hello there, I'm working a bit on a card system with HaxeFlixel and made a class extending FlxNapeSprite to use physic movement, but using card:Card.resetAngle() only turn the card at the FromStart angle for one frame and take it back to the origin position after, here is the class :

    class Card extends FlxNapeSprite {
    
        public function resetAngle():Void {
                var options:TweenOptions = {ease: FlxEase.sineIn};
                var duration = 0.7;
                FlxTween.angle(this,  0, 90,  duration, options);
        }
    
    }
    

    And here is what happens when using the function.

    Thanks in advance for any help.



  • Probably Nape is overwriting the value while doing physics



  • That's highly possible, but it seems the linearMotion from FlxTween works perfectly.
    I'll try to find a way around


Log in to reply