Inherits from CC3Node : CC3Identifiable : NSObject
Declared in Models.h

Overview

A customized node that automatically rotates by adjusting its rotational aspects on each update pass, and can slow the rotation speed over time based on a friction property.

To rotate a node using changes in rotation using the rotateBy… family of methods, as is done to this node, does NOT requre a specialized class. This specialized class is required to handle the freewheeling and friction nature of the behaviour after the rotation has begun.

Tasks

Properties

friction

The friction value that is applied to the spinSpeed to slow it down over time.

@property (nonatomic, assign) GLfloat friction

Discussion

A value of zero will not slow rotation down at all and the node will continue spinning indefinitely.

Declared In

Models.h

isFreeWheeling

Indicates whether the node is spinning without direct control by touch events.

@property (nonatomic, assign) BOOL isFreeWheeling

Declared In

Models.h

spinAxis

The axis that the cube spins around.

@property (nonatomic, assign) CC3Vector spinAxis

Discussion

This is different than the rotationAxis property, because this is the axis around which a CHANGE in rotation will occur. Depending on how the node is already rotated, this may be very different than the rotationAxis.

Declared In

Models.h

spinSpeed

The speed of rotation. This value can be directly updated, and then will automatically be slowed down over time according to the value of the friction property.

@property (nonatomic, assign) GLfloat spinSpeed

Declared In

Models.h