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 finding shortest way #43

Open
Devostated opened this issue Mar 4, 2022 · 0 comments
Open

Rotation finding shortest way #43

Devostated opened this issue Mar 4, 2022 · 0 comments

Comments

@Devostated
Copy link

Hello,
I wanted to have an axis gizmo to represent the camera angle, but I'm having huge problems, cause the rotation values don't use shortest way.
Any idea how this could be fixed ?

    pushMatrix();
    translate(width/2, 50);
    scale(3);
    rotateX((cam.getRotations()[0])*-1);
    rotateY((cam.getRotations()[1])*-1);
    rotateZ((cam.getRotations()[2])*-1);
    shape(axis);
    popMatrix();

chrome_s3lw2GvFpW

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

1 participant