Jump to content

Rotation issue


yuccai
 Share

Recommended Posts

Hello !

 

There are something i don't understand regarding mesh rotation.

 

1) i find the y positive rotation wrong but maybe it's because the basis is indirect.

2) when i rotate a mesh, does its rotation axis also turn? 

 

Here is an example : http://www.babylonjs.com/playground/#XXH6D#5

There are 4 boxes :

box1.rotation = (0,0,0)

box2.rotation = (0,0,0)

box3.rotation = (PI/2,0,0)

box4.rotation = (PI/2,0,0)

 

in the render loop 

box1.rotation.z += 0.01

box2.rotation.y += 0.01

box3.rotation.z += 0.01

box4.rotation.y += 0.01

 

there is no problem for box1 and box2 (even if i think that box2 should turn in the other way) but box3 and box4 are turning on the same axis in opposite way. I don't understand why.

 

Thank you

 

 

Link to comment
Share on other sites

No replies from the experts here, yet, yuccai?  hmm.  Well, me posting this worthless reply will bring the issue back to the top of the forum list.  I think boxes 1-3 are acting correctly, but box 4...  phew.  It is acting very strangely, in my opinion.

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