Home > Software design >  Can we rotate camera/viewport on Flame with Flutter?
Can we rotate camera/viewport on Flame with Flutter?

Time:04-21

I have a case that requires to rotate the camera or viewport (instead of component) on Flame on Flutter. Is Flame's camera implementation able to do that now? I cannot find any source regarding this.

CodePudding user response:

With the camera system that is built-in to FlameGame it isn't possible, but you can rotate the canvas in the FlameGame if you override the renderTree method.

With the new CameraComponent API it should be possible however, what you have to do then is to set the angle of the Viewfinder. https://docs.flame-engine.org/1.1.1/flame/camera_component.html#viewfinder

  • Related