xiphiaz Posted August 18, 2017 Share Posted August 18, 2017 I am building an application that has a lot of requirement of the user to understand the world coordinate system, so I want to add in the bottom left corner of the screen a widget that shows the world axes and their rotations. I've succeeded in attaching the axes lines to the camera however as expected the parenting caused the axes' rotation to be bound to the camera's local rotation, not the world coordinate system. So my question is how to I attach the axes to the camera, BUT make sure their rotation is locked to the world coordinate system? Demo here: http://www.babylonjs-playground.com/#V2FN42#1 Quote Link to comment Share on other sites More sharing options...
SvenFrankson Posted August 18, 2017 Share Posted August 18, 2017 Hi, In this case I'd rather not parent the mesh and manually update the sphere position only. Like this : http://www.babylonjs-playground.com/#V2FN42#2 Have a nice day ! Quote Link to comment Share on other sites More sharing options...
xiphiaz Posted August 18, 2017 Author Share Posted August 18, 2017 Oh very nice, thanks Sven! Quote Link to comment Share on other sites More sharing options...
xiphiaz Posted September 14, 2017 Author Share Posted September 14, 2017 @Sven / @Deltakosh the recent update (`[email protected]`) has caused a weird regression in this behavior - the position now as animated "springiness" in it. Is there a way to stop the position from animating? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 14, 2017 Share Posted September 14, 2017 Can you repro in the PG? (alpha2 is the very latest preview release) Quote Link to comment Share on other sites More sharing options...
xiphiaz Posted September 14, 2017 Author Share Posted September 14, 2017 @Deltakosh yep Sven's example above has the issue - just move the camera around and you can see the axis in the corner bouncing a bit Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 14, 2017 Share Posted September 14, 2017 Here is the fix: https://www.babylonjs-playground.com/#V2FN42#3 Quote Link to comment Share on other sites More sharing options...
xiphiaz Posted September 15, 2017 Author Share Posted September 15, 2017 Yup that did the trick, nice one @Deltakosh Just so I understand the code, what is the effect of forcing the camera to get the view matrix? camera.getViewMatrix(true) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 15, 2017 Share Posted September 15, 2017 it forces it to update before next frame 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.