Trying to pan and zoom

About Monkey 2 Forums Monkey 2 Programming Help Trying to pan and zoom

This topic contains 2 replies, has 2 voices, and was last updated by  cocon 1 year, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #12756

    cocon
    Participant

    I would be interested to find a way to pan and zoom from the center of the screen or the cursor position.

    #12757

    abakobo
    Participant

    You can use inverted matrix to reverse the transformation. As for the camera in the center, I pasted a Canvas extension I often use to watch the world “by viewpoint at the center of the screen” so SetCameraByCenter(New Vec2f(0,0)) will place things drawn at 0,0 on the center of the screen. you can even rotate now!

    #12761

    cocon
    Participant

    Awesome! 🙂

    After doing some tests and trying to figure out how to add rotations I resulted to this one.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.