2

I am creating flat tour using a-frame js . I wanted to move camera automatically.currently I am doing that using mouse .can anyone help me?

0

2 Answers 2

7

To do tweening in A-Frame, you'll probably use the a-animation system:

  <a-entity camera position="0 1.6 0">
    <a-animation attribute="position"
            dur="2000"
            easing="linear"
            to="0 1.6 -10"></a-animation>
  </a-entity>

JSFiddle. To customize this, see the animation documentation.

Aside: For VR scenes, moving the camera automatically is often uncomfortable for users, and should be done rarely and without acceleration, if at all.

Sign up to request clarification or add additional context in comments.

Comments

1

This along-path component is also good for interpolating an entity's position along a path: https://jsbin.com/dasefeh/edit?html,output

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.