Skip to content

Rotation finding shortest way #43

@Devostated

Description

@Devostated

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions