wo997 Posted February 23, 2017 Share Posted February 23, 2017 I want to make my camera follow an object, but I also need the ability to look around, the only thing I need at the moment is the camera rotation quaterion or matrix. Is it possible to calculate it somehow? If I had Z vector of camera I could just move camera back by Z vector times n from player and it would work well. If there is a topic about it leave a link below. Quote Link to comment Share on other sites More sharing options...
JohnK Posted February 23, 2017 Share Posted February 23, 2017 Parenting a free camera to a mesh will get the camera to follow the mesh and you can look around as you follow it. http://www.babylonjs-playground.com/#13XGJV Quote Link to comment Share on other sites More sharing options...
wo997 Posted February 23, 2017 Author Share Posted February 23, 2017 6 minutes ago, JohnK said: Parenting a free camera to a mesh will get the camera to follow the mesh and you can look around as you follow it. http://www.babylonjs-playground.com/#13XGJV great solution, I will try it Quote Link to comment Share on other sites More sharing options...
wo997 Posted February 23, 2017 Author Share Posted February 23, 2017 @JohnK I did it, works with arc rotate camera too 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.