copyWith method
Implementation
CollisionData copyWith({
Vector2? normal,
double? depth,
Direction? direction,
List<Vector2>? intersectionPoints,
}) {
return CollisionData(
normal: normal ?? this.normal,
depth: depth ?? this.depth,
direction: direction ?? this.direction,
intersectionPoints: intersectionPoints ?? this.intersectionPoints,
);
}