Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You might need to clarify further regarding the following: <em>"it didn't rotate as I expected"</em></p> <p>OpenGL ES (and ergo, cocos3D) uses the y-axis as up so the rotation order is still x-y-z. If you are importing a model, you then need to take into account the 3D editor's co-ordinate system and adapt accordingly.</p> <p>If you are not used to working with three-dimensional representations, the leap from 2D to 3D can be a significant hurdle. Within Cocos3D:</p> <ul> <li>the x-axis is positive on the right and negative on the left</li> <li>the y-axis is positive upwards and negative downwards</li> <li>the z-axis is positive moving towards you and negative moving away from you</li> </ul> <p>Envisage those three lines of axis, or even better, a piece of string.</p> <p>If you are rotating around the x-axis, hold the string horizontally from left to right: the object would rotating towards you or away from you.</p> <p>If you are rotating around the y-axis, hold the string vertically from feet to head: the object would rotate as if like a revolving door.</p> <p>If you are rotating around the z-axis, hold one end close to your chest and the other end as far away as possible: the object would rotate similar to a clock face.</p> <p>-- Update</p> <p>I heavily wouldn't recommend changing the rotation order as it is the OpenGL standard to use Y-X-Z. If you wish to modify it, take a look at CC3GLMatrixMath and look for <strong><em>kmMat4RotationYXZ</em></strong> - there is also <strong><em>kmMat4RotationZYX</em></strong>. If you want to have X-Y-Z, you would need to construct your own rotation matrix and update accordingly in CC3GLMatrix and CC3GLMatrixMath.</p> <p>As a reference, you also have the <a href="http://fly.cc.fer.hr/~unreal/theredbook/chapter03.html" rel="nofollow">OpenGL Red book</a> - it should have some suggestions for you.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload