bogdanfer Posted November 24, 2017 Share Posted November 24, 2017 hello, just started with babylon and got an fbx file exported from blender to .babylon. using `BABYLON.SceneLoader.Load` to get my object. The camera is rotation around its axis and instead I would like it to rotate around the object. Playground: http://www.babylonjs-playground.com/#JR2HVU don't know how to use an external file for the car, but I hope you guys can at least look at the code and maybe spot something i'm doing wrong. thank you Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 24, 2017 Share Posted November 24, 2017 Hi bogdanfer, welcome to the forum. https://www.babylonjs-playground.com/#JR2HVU#2 I did a little adjusting. The camera in this rabbit test scene... is a free camera... not the best for orbiting a mesh. Most people prefer ArcRotateCamera. So, I made another camera at lines 28-34. The camera at line 10 is ignored in this case. It is there ONLY to avoid a playground warning. For your scene, you may wish to make a new ArcRotateCamera just like I did. ArcRotateCamera's differ from FreeCamera's... a little bit. Primarily, ArcCams have .alpha, .beta, and .radius properties. FreeCams don't have those. I hope this helps. Holler if you have more questions. bogdanfer and Sebavan 1 1 Quote Link to comment Share on other sites More sharing options...
bogdanfer Posted November 27, 2017 Author Share Posted November 27, 2017 Hi @Wingnut, many thanks for the answer, it worked and helped me out! for some reason my scene is not centered. even the loading logo is off. any idea where to look into this? Wingnut 1 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.