#

- Developed by Dented Pixel
API Docs for: LeanTween 2.45

### Support LeanTween! |

#### Maintaining and adding new features takes time, your support is appreciated.

Show: Inherited Protected Private Deprecated

# LTBezierPath Class

Defined in: `LeanTween.cs:2577`

Manually animate along a bezier path with this class

## Constructor

### `LTBezierPath`

(

- `pts`

)

Defined in `LeanTween.cs:2577`

#### Parameters:

- `pts` Vector3 Array

  A set of points that define one or many bezier paths (the paths should be passed in multiples of 4, which correspond to each individual bezier curve)
  It goes in the order: startPoint,endControl,startControl,endPoint - Note: the control for the end and start are reversed! This is just a quirk of the API.

#### Example:

LTBezierPath ltPath = new LTBezierPath( new Vector3[] { new Vector3(0f,0f,0f),new Vector3(1f,0f,0f), new Vector3(1f,0f,0f), new Vector3(1f,1f,0f)} );
LeanTween.move(lt, ltPath.vec3, 4.0f).setOrientToPath(true).setDelay(1f).setEase(LeanTweenType.easeInOutQuad); // animate
Vector3 pt = ltPath.point( 0.6f ); // retrieve a point along the path

- Index
- Methods
- Properties

## Item Index

### Methods

- place
- place
- placeLocal
- placeLocal
- point

### Properties

- distance distance of the path (in unity units)

## Methods

### `place`

(

- `transform:Transform`
- `ratio:float`

)

Defined in `LeanTween.cs:2676`

Place an object along a certain point on the path (facing the direction perpendicular to the path)

#### Parameters:

- `transform:Transform` Transform

  the transform of the object you wish to place along the path

- `ratio:float` Float

  ratio of the point along the path you wish to receive (0-1)

#### Example:

ltPath.place( transform, 0.6f );

### `place`

(

- `transform:Transform`
- `ratio:float`
- `rotation:Vector3`

)

Defined in `LeanTween.cs:2690`

Place an object along a certain point on the path, with it facing a certain direction perpendicular to the path

#### Parameters:

- `transform:Transform` Transform

  the transform of the object you wish to place along the path

- `ratio:float` Float

  ratio of the point along the path you wish to receive (0-1)

- `rotation:Vector3` Vector3

  the direction in which to place the transform ex: Vector3.up

#### Example:

ltPath.place( transform, 0.6f, Vector3.left );

### `placeLocal`

(

- `transform:Transform`
- `ratio:float`

)

Defined in `LeanTween.cs:2708`

Place an object along a certain point on the path (facing the direction perpendicular to the path) - Local Space, not world-space

#### Parameters:

- `transform:Transform` Transform

  the transform of the object you wish to place along the path

- `ratio:float` Float

  ratio of the point along the path you wish to receive (0-1)

#### Example:

ltPath.placeLocal( transform, 0.6f );

### `placeLocal`

(

- `transform:Transform`
- `ratio:float`
- `rotation:Vector3`

)

Defined in `LeanTween.cs:2721`

Place an object along a certain point on the path, with it facing a certain direction perpendicular to the path - Local Space, not world-space

#### Parameters:

- `transform:Transform` Transform

  the transform of the object you wish to place along the path

- `ratio:float` Float

  ratio of the point along the path you wish to receive (0-1)

- `rotation:Vector3` Vector3

  the direction in which to place the transform ex: Vector3.up

#### Example:

ltPath.placeLocal( transform, 0.6f, Vector3.left );

### `point`

(

- `ratio:float`

)
Vector3

Defined in `LeanTween.cs:2637`

Retrieve a point along a path

#### Parameters:

- `ratio:float` Float

  ratio of the point along the path you wish to receive (0-1)

#### Returns:

Vector3:

Vector3 position of the point along the path

#### Example:

transform.position = ltPath.point( 0.6f );

## Properties

### `distance distance of the path (in unity units)`

Float

Defined in `LeanTween.cs:2628`