Jump to content

Mesh.rotate() function resets euler rotation to zero


Recommended Posts

@Temechon, Interesting feature ;)

I can see why setting ".rotation " cannot change ".rotationQuarternion" or vice versa.

After all we are just changing a property/variable.

Maybe ".rotation" or ".rotationQuarternion" should be  private and there should be setter methods ".setRotation() " or   ".setRotationQuarternion()". This way when one is set the other can be updated.

Regarding ".rotate()" . It is a method, so don't you think it would be a good idea for it to update both the property values ?

@Dad72, Thanks, I will check your solution

Link to comment
Share on other sites

I think if there are concerns related to using both "rotation" and "rotationQuaternion" togather then those should be documented

Might be a good idea to document this in the rotate API at least

I would even go as far as documenting it as a warning :)

Something to the effect that "Please note that rotate() will reset the "rotation" value to zero. If you expect to use "rotation" ,  please consider setting its value from "rotationQuaternion" using the "rotationQuaternion.toEulerAngles()" function. You might get unexpected results otherwise".


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.

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.


  • Recently Browsing   0 members

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