Jump to content

Using Scroll to Control Camera Path


jps0611
 Share

Recommended Posts

Howdy,

I'm struggling to conceptualize how I would tackle solving the following task. Imagine you have a scene as displayed in the attachment. I would like to bind scroll to moving the camera along a predefined path. Breaking it down into components...how do I:

  1. Attach a Camera to a predefined path?
  2. Allow a user to move the camera along that path?

Any suggestions that might point me in the right direction? @Deltakosh

Thanks,

JPS

Screen Shot 2018-01-10 at 9.02.42 AM.png

Link to comment
Share on other sites

I would say the easiest way is to create a spline in your 3D editor and add an animation to the camera to follow that spline.  When you are happy with the way it looks export it and get it to play in Babylon.  The when in your scroll wheel handler you simply set the keyframe on the existing animation using the  'goToFrame()' method.  The frame would be the current currentFrame + (totalFrames * speed of movement) .  

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