Jump to content

Animating Camera Rotation


rohapa
 Share

Recommended Posts

Hi guys, welcome @rohapa.  May I add...

    ...cameras can be parented to (invisible) mesh.  Here is a fancy playground that uses this method.

http://www.babylonjs-playground.com/#2FD2SC#0

MOVE mouse left-right (atop canvas), and see the camera z-rotate (banking), an unusual movement for any BJS camera.  A blank AbstractMesh named node is being used as the camera 'gizmo' (see line 45).

DRAG left - right... to change the direction of node and thus, also change the direction of the camera.

In the renderLoop (lines 66-76), lots of manipulation happens to node, which automatically affects node's child... the camera. 

Point is, you can animate a box (or plane or blank mesh) in ANY way, and that mesh CAN be a parent of a camera.  This method opens ALL avenues for camera animation.  Ok byeeeeeee.  :)

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...