Using Scroll to Control Camera Path

Recommended Posts


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



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

Share this post

Link to post
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) .  

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.