@Gama11 said in My Character move to right direction alone:

if (_up || _down || _left || _right) is missing the brackets. All code that comes after it should only be executed if that if-statement is true:

if (_up || _down || _left || _right) { velocity.x = speed; velocity.y = speed; var mA:Float = 0; if (_up) { mA = -90; if (_left) mA -= 45; else if (_right) mA += 45; } else if (_down) { mA = 90; if (_left) mA += 45; else if (_right) mA -= 45; } else if (_left) mA = 180; else if (_right) mA = 0; velocity.set(speed, 0); velocity.rotate(FlxPoint.weak(0, 0), mA); }

after giving the bracket to that part, its fixed! my character stop moving to right direction alone.
thanks Gama11. I need to learn more this haxeflixel programming. :)