Jump to content

How to lock object in arc camera?


RobinHood
 Share

Recommended Posts

Hi @RobinHood, I hope your charity work never stopped.

So, what @Wingnut showed you is exactly the demo you showed in your first message, but with an arc rotate. Parenting would be the idle candidate for lock an object in relation to the camera (or any other node).

If you want to lock the object in front of the camera in a certain position, you can use the camera's direction and move the mesh along this axis. For example, this way - https://www.babylonjs-playground.com/#21IMDW#14 . The fact that the mesh jitters needs to be checked (I will add an issue and we'll see when we address this), but in general, this would be  IMO the right way to go.

(BTW - any target camera (like the arcrotate) has the function getFrontPosition which can help here - https://www.babylonjs-playground.com/#21IMDW#15. again, same issue, we will see what can be done)

 

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