BoundedPositionBehavior constructor
BoundedPositionBehavior({
- required Shape bounds,
- PositionProvider? target,
- double precision = 0.5,
- int? priority,
- ComponentKey? key,
Implementation
BoundedPositionBehavior({
required Shape bounds,
PositionProvider? target,
double precision = 0.5,
super.priority,
super.key,
}) : assert(precision > 0, 'Precision must be positive: $precision'),
_bounds = bounds,
_target = target,
_previousPosition = Vector2.zero(),
_precision = precision;