locked
Zoom control RRS feed

  • Question

  • Hi all,

    Is there a convenient way to control the zoom factor of the current camera?

    Until now I'm binding client event to ZOOM_IN and ZOOM_OUT events:
    SimConnect_MapClientEventToSimEvent(m_hSimConnect, EVENT_CAMERA_ZOOM_IN, "ZOOM_IN"); 

    And after I transmit these events to the server through SimConnect_TransmitClientEvent.


    The main problem is that this method misses precision. Let say I want a zoom factor of 1.7, I simply can't have it, as it jumps from 1.5 to 2.0.
    I know there is a ZOOM_IN_FINE event. But it is unfortunately impossible to know how many times I have to transmit this event to reach my 1.7 factor!

    What I need is quite simple:
    1. To be able to set the current factor of the zoom (I give a factor and the camera zoom in or out to this factor).
    2. ...OR to be able to get the current factor of the zoom.

    Thanks in advance

    Thursday, July 17, 2008 1:47 PM

Answers

  • Hey Alex,

    Unfortunately, that one function is the only control over the view system provided via SimConnect in V1.  The only work around for now would be to set the desired zoom in the .FLT file you are loading.

    Tim
    http://beatlesblog.spaces.live.com/
    • Proposed as answer by Todd Landstad Wednesday, July 23, 2008 11:19 PM
    • Marked as answer by Todd Landstad Thursday, October 9, 2008 10:23 PM
    Thursday, July 17, 2008 5:59 PM

All replies

  • I have not used this function, but it looks like it may do what you are asking...

    SimConnect_CameraSetRelative6DOF

    The SimConnect_CameraSetRelative6DOF function is used to adjust the user's aircraft view camera.

    Syntax

    HRESULT SimConnect_CameraSetRelative6DOF(
      HANDLE  hSimConnect,
      float  fDeltaX,
      float  fDeltaY,
      float  fDeltaZ,
      float  fPitchDeg,
      float  fBankDeg,
      float  fHeadingDeg
    );


    Ryan
    Thursday, July 17, 2008 3:57 PM
  • Thanks FG, but I can move and orientate the camera ;)
    What I'm trying to do is to change the zoom level of this object programmatically.
    Thursday, July 17, 2008 4:09 PM
  • Hey Alex,

    Unfortunately, that one function is the only control over the view system provided via SimConnect in V1.  The only work around for now would be to set the desired zoom in the .FLT file you are loading.

    Tim
    http://beatlesblog.spaces.live.com/
    • Proposed as answer by Todd Landstad Wednesday, July 23, 2008 11:19 PM
    • Marked as answer by Todd Landstad Thursday, October 9, 2008 10:23 PM
    Thursday, July 17, 2008 5:59 PM