bitter-carpenter-85508
03/03/2023, 4:27 PMbitter-carpenter-85508
03/03/2023, 4:27 PMbitter-carpenter-85508
03/03/2023, 4:28 PMcolossal-match-5265
03/03/2023, 4:31 PMFlxG.game is an instance of FlxGame which extends openfl Sprite.
Sprite extend openfl DisplayObject.
This means they have a scaleX and scaleY property:
https://api.openfl.org/openfl/display/DisplayObject.html#scaleX
⚠️ That being said, you dont want to flip the game's scale, because it usually breaks things to mess with the `FlxGame`'s scale.
In this case it turns out that the internals of FlxCamera is also an openfl Sprite. It's where all flixel things (per camera) get rendered. the internal Sprite of an FlxCamera is the flashSprite property.
Putting things together:
hx
FlxG.camera.flashSprite.scaleX *= -1; // flip over horizontal axis
FlxG.camera.flashSprite.scaleY *= -1; // or flip over vertical axiscolossal-match-5265
03/03/2023, 4:32 PMbitter-carpenter-85508
03/03/2023, 4:33 PMcolossal-match-5265
03/03/2023, 4:33 PMbitter-carpenter-85508
03/03/2023, 4:33 PMcolossal-match-5265
03/03/2023, 4:33 PMbitter-carpenter-85508
03/03/2023, 4:34 PMcolossal-match-5265
03/03/2023, 4:34 PMbitter-carpenter-85508
03/03/2023, 4:34 PMcolossal-match-5265
03/03/2023, 4:34 PMcolossal-match-5265
03/03/2023, 4:34 PMbitter-carpenter-85508
03/03/2023, 4:35 PMbitter-carpenter-85508
03/03/2023, 4:36 PMshy-wire-69404
03/03/2023, 4:36 PMnewUV = 1.0 - uvshy-wire-69404
03/03/2023, 4:36 PMcolossal-match-5265
03/03/2023, 4:36 PMcolossal-match-5265
03/03/2023, 4:37 PMbitter-carpenter-85508
03/03/2023, 4:38 PMeager-terabyte-7248
03/03/2023, 4:43 PMable-printer-41379
03/03/2023, 4:43 PMable-printer-41379
03/03/2023, 4:43 PMwitty-island-52596
03/03/2023, 4:44 PMshy-wire-69404
03/03/2023, 4:44 PMeager-terabyte-7248
03/03/2023, 4:45 PMstraight-twilight-37046
03/03/2023, 4:45 PMshy-wire-69404
03/03/2023, 4:45 PM