When moving the camera, the BodyComponents gets rendered off the game area, do you know why or is it a bug?
Flutter:
child: Scaffold(
body: SafeArea(
child: Column(
children: [
const Text("data"),
Container(
color: Colors.blue,
alignment: Alignment.bottomCenter,
child: SizedBox(
width: 300,
height: 600,
child: Stack(
children: [
GameWidget<BallsSampleForge2DGame>(
game: BallsSampleForge2DGame(),
Flame:
camera.moveTo(<some vector>)
The GameWidget
is not clipped by default.
You can either use a FixedResolutionViewport
which automatically clips the canvas, or you can wrap the GameWidget
in Flutter's ClipRect
widget.