# CCActionRotateTo Class Reference

Inherits from | CCActionInterval : CCActionFiniteTime : CCAction : NSObject
Conforms to | NSCopying
Declared in | CCActionInterval.h

## Overview

This action rotates the target to the specified angle. The direction will be decided by the shortest route.

## Tasks

- `+ actionWithDuration:angle:`
- `+ actionWithDuration:angle:simple:`
- `– initWithDuration:angle:simple:`
- `– initWithDuration:angle:`
- `+ actionWithDuration:angleX:`
- `– initWithDuration:angleX:`
- `+ actionWithDuration:angleY:`
- `– initWithDuration:angleY:`

## Class Methods

### actionWithDuration:angle:

Creates the action.

`+ (id)actionWithDuration:(CCTime)duration angle:(float)angle`

#### Parameters

duration

  Action duration.

angle

  Angle to rotate to (degrees).

#### Return Value

New rotate action.

#### Declared In

`CCActionInterval.h`

### actionWithDuration:angle:simple:

Creates the action.

`+ (id)actionWithDuration:(CCTime)duration angle:(float)angle simple:(bool)simple`

#### Parameters

duration

  Action duration.

angle

  Angle to rotate to (degrees).

direct

  Simple rotation, no smart checks.

#### Return Value

New rotate action.

#### Declared In

`CCActionInterval.h`

### actionWithDuration:angleX:

Creates the action with angleX rotation angle.

`+ (id)actionWithDuration:(CCTime)t angleX:(float)aX`

#### Parameters

t

  Action duration.

aX

  X rotation in degrees.

#### Return Value

New rotate action.

#### Declared In

`CCActionInterval.h`

### actionWithDuration:angleY:

Creates the action with angleY rotation angle.

`+ (id)actionWithDuration:(CCTime)t angleY:(float)aY`

#### Parameters

t

  Action duration.

aY

  Y rotation in degrees.

#### Return Value

New rotate action.

#### Declared In

`CCActionInterval.h`

## Instance Methods

### initWithDuration:angle:

Initializes the action.

`- (id)initWithDuration:(CCTime)duration angle:(float)angle`

#### Parameters

duration

  Action duration.

angle

  Angle to rotate to (degrees).

#### Return Value

New rotate action

#### Declared In

`CCActionInterval.h`

### initWithDuration:angle:simple:

Initializes the action.

`- (id)initWithDuration:(CCTime)duration angle:(float)angle simple:(bool)simple`

#### Parameters

duration

  Action duration.

angle

  Angle to rotate to (degrees).

direct

  Simple rotation, no smart checks.

#### Return Value

New rotate action

#### Declared In

`CCActionInterval.h`

### initWithDuration:angleX:

Initializes the action with angleX rotation angle.

`- (id)initWithDuration:(CCTime)t angleX:(float)aX`

#### Parameters

t

  Action duration.

aX

  X rotation in degrees.

#### Return Value

New rotate action.

#### Declared In

`CCActionInterval.h`

### initWithDuration:angleY:

Initializes the action with angleY rotation angle.

`- (id)initWithDuration:(CCTime)t angleY:(float)aY`

#### Parameters

t

  Action duration.

aY

  Y rotation in degrees.

#### Return Value

New rotate action.

#### Declared In

`CCActionInterval.h`