Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rotation on both axis at the same time #3

Closed
piatra opened this issue Feb 3, 2012 · 1 comment
Closed

Rotation on both axis at the same time #3

piatra opened this issue Feb 3, 2012 · 1 comment

Comments

@piatra
Copy link

piatra commented Feb 3, 2012

Is something like this correct ? Matrix.RotationX(value).add(Matrix.RotationY(value)); How would i go about if i wanted to get the rotation on both axis by a given value ?

@jcoglan
Copy link
Owner

jcoglan commented Feb 3, 2012

If you want to rotate a vector about the X axis and then the Y axis, you do this my multiplying:

rotatedVector = Matrix.RotationY(value).x( Matrix.RotationX(value).x(vector) )

@jcoglan jcoglan closed this as completed Feb 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants