javascript - Three.js issue with object position when using matrix make rotation -


I am trying to rotate an object which I have called "moon", which instead of Trying to use the matrix was . By the way:

  Moon. Epilean Matrix (new three. Matrix 4). Merotation Y (Math.PI / 100));  

The good thing is that the object is moving well, but I do not know why the object has changed its initial position:

  moon Position.set (30,130); From  

(0,0,0)

Can you tell me that if I execute the first row, then the object 0,0,0 And if not in the correct position (30,130)?

Thank you.

Regards.

Jose

Modifies the applied matrix () matrix directly when you set the position, then the matrix is ​​only in the render loop Updates or if you call update matrix () Therefore, depending on the order of your operation, the applicable calling matrix () can definitely stop your positioning settings.

Three on matrix changes. JS document page is helpful ..

In addition to this, I wrote a series of self test cases to understand the different methods of rotation and implementation of the changes of the message and geometric. Can be helpful:


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -