-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix borders on rotating camera #2679
base: dev
Are you sure you want to change the base?
Conversation
maybe make it so your still able to change the flashsprite rotation, maybe FlxCamera.rotation? |
and also make the sprites able to render inside the bound that has angle applied, cause it seems like any sprites outside the original bound won't render even if it's in the camera view |
@NeeEoo, Do you have a test case for this? I don't see how I'm supposed to change |
It just changes how the angle property looks like visually by making it not rotate the openfl sprite that the camera uses |
So I made this test case: I think I misunderstood the purpose for this. I assumed the goal was to actually rotate the camera's view space, but after trying this out, it seems it was literally made to "prevent the black borders when rotating the camera", not to show FlxSprites in that region If that's all you really wanted to do, all you need to do is: final bgColor = 0xFF404040;
FlxG.cameras.bgColor = bgColor;
FlxG.stage.color = bgColor; |
It was meant to show FlxSprites in that rotated space, but i haven't figured out the code in the isOnScreen to show the stuff outside of the view. Aka rotating the camera view |
I'm using this in my fork of HaxeFlixel and I made these changes:
and it works perectly in tile render mode. I haven't tested it in blit render mode however. |
any updates on this?? |
Nah not really been kinda unmotivated as of recently. The only thing thats basically needed is fixing the isOnScreen |
This fixes the black borders that appear when you rotate a FlxCamera, since it rotates the openfl Sprite which the camera renders to.
Reason it's a draft is because i haven't been able to test it on blitting render, and might need some testing since isOnScreen probably doesn't account for the camera angle.