Kei 27 Posted January 6, 2016 Share Posted January 6, 2016 http://www.babylonjs-playground.com/#I3AVNI created a plane that always looks to the camera.When click " Turn right Plane", Plane will be rotated with the same direction of the clockwise.I want that when click " Turn right Red Box" , Red Box will rotate with the same direction of the Plane. But i don't know how to do that. Not using Redbox.parent = Plane;Could you help me? Quote Link to comment Share on other sites More sharing options...
RaananW Posted January 6, 2016 Share Posted January 6, 2016 Hi! Is the problem that the box is turning the other way around? If that's the case, just use a negative value - http://www.babylonjs-playground.com/#I3AVN#1 Quote Link to comment Share on other sites More sharing options...
Kei 27 Posted January 7, 2016 Author Share Posted January 7, 2016 Thanks RaananW for reply.But that is not what I want.I fixed the buttons. The first clicked object will rotate, and stop rotating when click again.http://www.babylonjs-playground.com/#I3AVN#2I want that when i move camera, in other field of view , and click " Turn right Plane", Plane always rotates with the same direction of the clockwise. And then if I click " Turn right Red Box", Red Box will be rotated with the direction of the Plane (same direction as the clockwise).I click "Turn right Red Box" again, Red Box stops rotating. And then i move camera,I click "Turn right Red Box" once again , Red Box will be rotated with the direction of the Plane (same direction as the clockwise). 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.