Uses spring physics to animate the target object towards a position that is defined as the lookAtTarget object's position plus the vector defined by the positionOffset property.

Constructor

@:value({ damping : 4, mass : 40, stiffness : 1, lookAtObject : null, targetObject : null })new(?targetObject:Entity, ?lookAtObject:ObjectContainer3D, stiffness:Float = 1, mass:Float = 40, damping:Float = 4)

Variables

damping:Float

Damping is the spring internal friction, or how much it resists the "boinggggg" effect. Too high and you'll lose it! A number between 1 and 20 is recommended.

mass:Float

Mass of the camera, if over 120 and it'll be very heavy to move.

@:value(new Vector3D(0, 500, -1000))positionOffset:Vector3D = new Vector3D(0, 500, -1000)

Offset of spring center from target in target object space, ie: Where the camera should ideally be in the target object space.

stiffness:Float

Stiffness of the spring, how hard is it to extend. The higher it is, the more "fixed" the cam will be. A number between 1 and 20 is recommended.

Methods

Inherited Variables

Defined by LookAtController

lookAtPosition:Vector3D

The Vector3D object that the target looks at.

upAxis:Vector3D

The vector representing the up direction of the target object.

Defined by ControllerBase

Inherited Methods