Search code examples
delphiviewportresolutionfiremonkey

Constant resolution when resizing 3D Viewport in Firemonkey for Delphi XE6


I am trying Firemonkey for the first time and I can not figure out how to set the 3D viewport so that it keeps it's resolution constant when resizing the 3D viewport.

When the viewport is resized, everything in the viewport becomes smaller or larger accordingly.

How do I change this setting?


Solution

  • That is the normal behavior of the 3D Viewport.

    I think what you want to know is how to move the view closer and farther, like zooming in and out. You do that by moving the camera in and out.

    You have to make sure you have the "UsingDesignCamera" property turned off and add a camera to the scene. Then zoom in closer or farther by changing the Camera.Position.Z (or whichever axis)

    That way if you increase the viewport size and want the size of the objects to stay the same as they were, you would change the camera distance to compensate.