---
title: "cubicBezier(controlPoint1:controlPoint2:)"
framework: realitykit
role: symbol
role_heading: Type Method
path: "realitykit/animationtimingfunction/cubicbezier(controlpoint1:controlpoint2:)"
---

# cubicBezier(controlPoint1:controlPoint2:)

Creates a timing function that accelerates and then decelerates towards the target value with the cubic bezier shape specified by two control points.

## Declaration

```swift
static func cubicBezier(controlPoint1: SIMD2<Float>, controlPoint2: SIMD2<Float>) -> AnimationTimingFunction
```

## Parameters

- `controlPoint1`: The first control point for the cubic bezier function.
- `controlPoint2`: The second control point for the cubic bezier function.

## Return Value

Return Value The cubic bezier timing function.

## See Also

### Creating timing functions

- [default](realitykit/animationtimingfunction/default.md)
- [easeIn](realitykit/animationtimingfunction/easein.md)
- [easeInOut](realitykit/animationtimingfunction/easeinout.md)
- [easeOut](realitykit/animationtimingfunction/easeout.md)
- [linear](realitykit/animationtimingfunction/linear.md)
