Controlling your camera has never been easier. Instead of just setting its position directly, you can now tell the camera to move towards a target position:
wade.moveCamera({x: 5, y: 5, z: 2}, speed);
But easy doesn't mean basic! You can use a constant speed, or even choose to define speed as a function of the distance to your target:
wade.moveCamera({x: 5, y: 5, z: 2}, function(distance)
{
return distance * distance;
});
You can now set the camera to follow a particular object too, optionally adding some inertia to its movement, or an offset relative to the target's position:
wade.setCameraTarget(sceneObject, inertia, offset);
And to make the whole system even more convenient, we've added a new onCameraMoveComplete event.
|