Jump to content

how to make mesh face camera


HenryPeng
 Share

Recommended Posts

Hi HP, good to see you again.

http://playground.babylonjs.com/#MNV8U#2

(1)  That shows two ways to make mesh1 face camera.  (line 26 OR line 32)

(2)  Perhaps not possible.  When mesh2 is parent of mesh1... mesh2 is boss.  Parenting is higher priority than mesh1.billboardMode and mesh1.lookAt().

Maybe others will have more ideas.

Link to comment
Share on other sites

I think... user wants mesh1 to face camera.... while mesh2 is "changing rotation".

http://playground.babylonjs.com/#MNV8U#4

(I failed).  But maybe I misunderstood. 

If possible... it would look similar to this:  http://playground.babylonjs.com/#MNV8U#5

(but WITH parenting and WITHOUT camera.alpha animating.  I'm sort of simulating success, with #5)  *shrug*

Perhaps...  mesh1.ignoreInheritedRotation = true;  That would allow .billboardMode and .lookAt() to take control of child rotations.

Henry... are you planning to use mesh1 as a "label" for mesh2?   For a text panel, icon, or button that users can always read/click?  If so, we have some other ways of doing that... which might be easier.  We'll talk.

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