Jump to content

Rotate Object


Kei 27
 Share

Recommended Posts

http://www.babylonjs-playground.com/#I3AVN

I 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?

Link to comment
Share on other sites

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#2

I 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).

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...