---
title: "collisionBehavior(_:beganContactFor:with:at:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uicollisionbehaviordelegate/collisionbehavior(_:begancontactfor:with:at:)"
---

# collisionBehavior(_:beganContactFor:with:at:)

Called when a collision between two dynamic items has begun.

## Declaration

```swift
optional func collisionBehavior(_ behavior: UICollisionBehavior, beganContactFor item1: any UIDynamicItem, with item2: any UIDynamicItem, at p: CGPoint)
```

## Parameters

- `behavior`: The collision behavior that owns the dynamic items that have started to contact each other.
- `item1`: The first of the two dynamic items participating in the collision.
- `item2`: The second of the two dynamic items participating in the collision.
- `p`: The contact point for the collision. The coordinate system that pertains to a collision depends on how you initialized the associated animator. For details, read the Overview of doc://com.apple.uikit/documentation/UIKit/UIDynamicAnimator.

## See Also

### Responding to UIKit Dynamics collisions

- [collisionBehavior(_:beganContactFor:withBoundaryIdentifier:at:)](uikit/uicollisionbehaviordelegate/collisionbehavior(_:begancontactfor:withboundaryidentifier:at:).md)
- [collisionBehavior(_:endedContactFor:withBoundaryIdentifier:)](uikit/uicollisionbehaviordelegate/collisionbehavior(_:endedcontactfor:withboundaryidentifier:).md)
- [collisionBehavior(_:endedContactFor:with:)](uikit/uicollisionbehaviordelegate/collisionbehavior(_:endedcontactfor:with:).md)
