Skip to content

Check for already at desiredPosition returns false positives sometimes #28

Open
@UXVirtual

Description

@UXVirtual

The below snippet in the update() method causes camera rotations near the desiredPosition to incorrectly match, preventing rotateTo() from firing:

if (!this.desiredPosition.equals(rotateToVec3)) {
        this.desiredPosition.copy(rotateToVec3);
        this.rotateTo(this.desiredPosition);
}

removing the !this.desiredPosition.equals(rotateToVec3) check results in more consistent behavior, with the exception that the camera will automatically rotate to face the very top of the model on load if rotateTo is not set.

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