Fork Flixel Animate to Fix frameOffsetAngle, layer
This commit is contained in:
@@ -366,26 +366,9 @@ class FunkinSprite extends FlxAnimate implements IBeatReceiver implements IOffse
|
||||
}
|
||||
|
||||
override function prepareDrawMatrix(matrix:FlxMatrix, camera:FlxCamera):Void {
|
||||
matrix.translate(-origin.x, -origin.y);
|
||||
|
||||
if (frameOffsetAngle != null && frameOffsetAngle != angle)
|
||||
{
|
||||
var angleOff = (frameOffsetAngle - angle) * FlxAngle.TO_RAD;
|
||||
var cos = Math.cos(angleOff);
|
||||
var sin = Math.sin(angleOff);
|
||||
// cos doesnt need to be negated
|
||||
matrix.rotateWithTrig(cos, -sin);
|
||||
matrix.translate(-frameOffset.x, -frameOffset.y);
|
||||
matrix.rotateWithTrig(cos, sin);
|
||||
}
|
||||
else
|
||||
matrix.translate(-frameOffset.x, -frameOffset.y);
|
||||
|
||||
matrix.translate(origin.x, origin.y);
|
||||
|
||||
super.prepareDrawMatrix(matrix, camera);
|
||||
|
||||
if(__shouldDoZoomFactor()) {
|
||||
if (__shouldDoZoomFactor()) {
|
||||
__prepareZoomFactor(_rect2, camera);
|
||||
matrix.setTo(
|
||||
matrix.a * _rect2.width, matrix.b * _rect2.height,
|
||||
|
||||
Reference in New Issue
Block a user