I was looking around and cant find if its possible to animate the cameras target?
currently I am doing
var animation = new BABYLON.Animation("cameraSwoop", "position", 30,
BABYLON.Animation.ANIMATIONTYPE_VECTOR3)
var keyFrames = []
keyFrames.push({
frame: 0,
value: camera.position.clone()
})
for(var i=1; i<=path.length; i++){
var ap = path[i-1]
keyFrames.push({
frame: step*i,
value: ap
})
}
animation.setKeys(keyFrames)
camera.animations = [animation]
animation = scene.beginAnimation(camera, 0, step*path.length, false, 1)
and use a secondary observer to set the target, only problem is it makes a nasty jump on the initial set target where the camera does not smoothly pan to the target.
I found the old thread where I do it manually on the old forum… but I don’t wanna do that again.