Class TCastleMouseLookNavigation
Unit
CastleCameras
Declaration
type TCastleMouseLookNavigation = class(TCastleNavigation)
Description
Abstract navigation class that can utilize mouse look, during which mouse cursor is hidden and we look at MouseLookDelta every frame.
Hierarchy
Overview
Fields
Methods
Properties
Description
Fields
|
nested const DefaultMouseLookHorizontalSensitivity = Pi * 0.1 / 180; |
|
|
nested const DefaultMouseLookVerticalSensitivity = Pi * 0.1 / 180; |
|
Methods
|
function UsingMouseLook: Boolean; |
|
|
procedure ProcessMouseLookDelta(const Delta: TVector2); virtual; |
|
|
constructor Create(AOwner: TComponent); override; |
|
|
procedure Update(const SecondsPassed: Single; var HandleInput: boolean); override; |
|
|
function Motion(const Event: TInputMotion): boolean; override; |
|
Properties
|
property MouseLook: boolean read FMouseLook write SetMouseLook default false; |
Use mouse look to navigate (rotate the camera).
This also makes mouse cursor of Container hidden, and forces mouse position to the middle of the window (to avoid the situation when mouse movement is blocked by screen borders).
Setting this property at design-time (in CGE editor) does not activate the mouse look in CGE editor. It only controls the mouse look once the application is running.
|
|
property MouseLookHorizontalSensitivity: Single
read FMouseLookHorizontalSensitivity write FMouseLookHorizontalSensitivity
default DefaultMouseLookHorizontalSensitivity; |
Mouse look sensitivity, if MouseLook is working. These properties specify how much angle change is produced by moving mouse by 1 pixel.
|
|
property InvertVerticalMouseLook: boolean
read FInvertVerticalMouseLook write FInvertVerticalMouseLook
default false; |
If this is True and MouseLook works, then the meaning of vertical mouse movement is inverted: when user moves mouse up, he looks down. Some players are more comfortable with such configuration.
|
Generated by PasDoc 0.16.0.