Jump to content

Trying to get an ArcRotateCam to follow an object [with code examples]


alurpal
 Share

Recommended Posts

Trying to get an ArcRotateCam to follow an object while retaining it's default movement behavior (keyboard and mouse rotation and zoom).

I have a simple box that will move to wherever you click on the ground. In this first attempt, the camera will change it's target on click and default movement behavior works: http://www.babylonjs-playground.com/index2_5.html#2ENPZ7#5

Now in this version, I attempted to update the target within a function registered to scene.registerBeforeRender(). The following now works great but I lose all default controls: http://www.babylonjs-playground.com/index2_5.html#2ENPZ7#4

Hoping someone can lead me in the right direction. 

 

Thanks!

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