position property

Vector2 position
inherited

This is the current position of the camera, ie the world coordinate that is rendered on the top left of the screen (origin of the screen space).

Zero means no translation is applied. You can't change this directly; the camera will handle all ongoing movements so they smoothly transition. If you want to immediately snap the camera to a new place, you can do:

  camera.snapTo(newPosition);

Implementation

Vector2 get position => _internalPosition.clone();