Skip to content

3D Navigation Cube - how to synchronize interaction on the cube back to the main scene? #2

@mlimper

Description

@mlimper

This question has been asked offline by users.

It seems the main problem is that the center of rotation of the main scene is not taken into account, since the small scene showing the navigation cube always has a center of rotation at the origin.

One could therefore try the following, in order to rotate around the main scene's center:

  • Consider the view matrix of the 3D cube scene a rotation matrix R
  • Obtain the center of rotation c from the main scene
  • Create a translation matrix T- that translates by -c
  • Create a translation matrix T+ that translates by +c
  • Set the view matrix of the main scene to T+ * R * T-

This is of course without any guarantee for correctness - I didn't try ;-)
Just a proposal how to start.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions