aWeirdo Posted May 8, 2016 Share Posted May 8, 2016 Hi guys, i notised some protential bugs setting a camera.target = mesh / mesh.position; and then attempting to pan, while in my head it would make sense to update the camera.target on panning and stop following the mesh, what it does: camera.target = mesh.position; //panning moves the target mesh around. camera.target = mesh; //attempting to pan crashes babylon. I made a PG to show it, clicking 1 or 2 on your keyboard or numpad will set the camera targets described above. and you can then pan by right-clicking. http://www.babylonjs-playground.com/#1Y5NE6#1 Cheers. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 9, 2016 Share Posted May 9, 2016 Just use clone http://www.babylonjs-playground.com/#1Y5NE6#2 Quote Link to comment Share on other sites More sharing options...
adam Posted May 9, 2016 Share Posted May 9, 2016 @Deltakosh press 2 and then try to pan the camera. console says: babylon.js:9 Uncaught TypeError: this.target.addInPlace is not a function Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 9, 2016 Share Posted May 9, 2016 Yep...It's a bug...I'll fix it..but you won't be able to pan on a target set to a camera. aWeirdo 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.