HenryPeng Posted September 23, 2016 Share Posted September 23, 2016 I have two questions for mesh. I hope someone can give me help. (1) How to make a mesh that just like plane always face a camera? (2)When the mesh1 has mesh2 as parent, how to control the mesh1 face camera while mesh2 changing rotation ? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted September 23, 2016 Share Posted September 23, 2016 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. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 23, 2016 Share Posted September 23, 2016 (2) is possible as well: http://playground.babylonjs.com/#MNV8U#3 Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted September 24, 2016 Share Posted September 24, 2016 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.