Jump to content

animate the camera towards a target


Terminator
 Share

Recommended Posts

Hello,

If I want to animate the position.z of the camera, I use:

var animationCameraPosition = new BABYLON.Animation("cameraPositionAnimation", "position.z", 30, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT);

is there a way to animate smoothly towards a certain target point ?? for example "target.z" e.g:

var animationCamera = new BABYLON.Animation("cameraPositionAnimation", "target.z", 30, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT);

 

Note: I am looking for a way where I can set the animation for each axis separately without using Vector3 (e.g target.x / target.y / target.z)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...