Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
0.8.4:cameras [2022/07/20 16:02] – [Target] admin0.8.4:cameras [2022/07/22 12:54] – [Creating a Smooth Controller at Runtime] admin
Line 134: Line 134:
 ===== Smooth Camera Controller ===== ===== Smooth Camera Controller =====
  
-Since version 0.8.4.2341 a TGorillaViewport component provides an embedded //TGorillaSmoothCameraController// component with automatic mouse feedback integration. This means: In case //UsingDesignCamera// is set to TRUE, the viewport will register OnMouseDown, OnMouseUp and OnMouseMove events and forward those events to the embedded TGorillaSmoothCameraController.+Since version 0.8.4.2341 a TGorillaViewport component provides an embedded //TGorillaSmoothCameraController// component with automatic mouse feedback integration. This means: In case //TGorillaViewport.UsingDesignCamera// is set to TRUE, the viewport will register OnMouseDown, OnMouseUp and OnMouseMove events and forward those events to the embedded TGorillaSmoothCameraController.
  
 This enables an easy-to-use mouse navigation for your 3D scene without any effort. This enables an easy-to-use mouse navigation for your 3D scene without any effort.
Line 220: Line 220:
 procedure TForm1.FormCreate(Sender: TObject); procedure TForm1.FormCreate(Sender: TObject);
 begin begin
 +  /// Deactivate design camera controller before registering user-specific events for mouse feedback
 +  GorillaViewport1.UsingDesignCamera := FALSE;
 +  
 +  /// Register user-specific mouse events to control our camera
   GorillaViewport1.OnMouseUp   := DoOnViewportMouseUp;   GorillaViewport1.OnMouseUp   := DoOnViewportMouseUp;
   GorillaViewport1.OnMouseDown := DoOnViewportMouseDown;   GorillaViewport1.OnMouseDown := DoOnViewportMouseDown;
Line 240: Line 244:
   /// Activate the camera for rendering   /// Activate the camera for rendering
   GorillaViewport1.Camera := FMyCamera;   GorillaViewport1.Camera := FMyCamera;
-  GorillaViewport1.UsingDesignCamera := FALSE; 
      
   [...]   [...]
Line 297: Line 300:
 |ShiftImpulse.Y|Get or set the current impulse for shifting on Y axis.| |ShiftImpulse.Y|Get or set the current impulse for shifting on Y axis.|
 |ShiftImpulse.Z|Get or set the current impulse for shifting on Z axis.| |ShiftImpulse.Z|Get or set the current impulse for shifting on Z axis.|
 +
 +Next step:: [[lights|Lights]]