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

Added missing Decal.setRotation method. #2111

Merged
merged 3 commits into from Jul 27, 2014
Merged

Added missing Decal.setRotation method. #2111

merged 3 commits into from Jul 27, 2014

Conversation

nooone
Copy link
Contributor

@nooone nooone commented Jul 13, 2014

http://stackoverflow.com/questions/24632095/how-to-rotate-decal-over-more-then-one-axis-at-moment

It looks like currently the only way to set a rotation on all axes at the same time is via a workaround like this:

decal.setRotationX(0);
decal.setRotationY(0);
decal.setRotationZ(0);
decal.rotateX(angleX);
decal.rotateY(angleY);
decal.rotateZ(angleZ);

Or the shorter but more ugly version:

decal.setRotationX(angleX);
decal.rotateY(angleY);
decal.rotateZ(angleZ);

That's why I added a Decal.setRotation(...) method which can set all angles at once.

@xoppa
Copy link
Member

xoppa commented Jul 27, 2014

Please rename the arguments to yaw pitch and roll (and use the comment to specify which axis it is)

xoppa added a commit that referenced this pull request Jul 27, 2014
Added missing Decal.setRotation method.
@xoppa xoppa merged commit 997517c into libgdx:master Jul 27, 2014
@nooone nooone deleted the decal branch July 27, 2014 18:18
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

Successfully merging this pull request may close these issues.

None yet

2 participants