Property | Type | Description | |
---|---|---|---|
farClipPlane3D | float | ||
nearClipPlane3D | float | ||
positionZ3D | float |
Method | Description | |
---|---|---|
Camera ( ) : System | ||
forceMatrixUpdate ( ) : void |
this forces the matrix and bounds dirty
|
|
onEntityTransformChanged ( |
||
screenToWorldPoint ( Point screenPosition ) : Vector2 |
converts a point from screen coordinates to world
|
|
screenToWorldPoint ( Vector2 screenPosition ) : Vector2 |
converts a point from screen coordinates to world
|
|
setMaximumZoom ( float maxZoom ) : |
maximum non-scaled value (0 - float.Max) that the camera zoom can be. Defaults to 3
|
|
setMinimumZoom ( float minZoom ) : |
minimum non-scaled value (0 - float.Max) that the camera zoom can be. Defaults to 0.3
|
|
setPosition ( Vector2 position ) : |
shortcut to entity.transform.setPosition
|
|
setRotation ( float radians ) : |
shortcut to entity.transform.setRotation
|
|
setRotationDegrees ( float degrees ) : |
shortcut to entity.transform.setRotationDegrees
|
|
setZoom ( float zoom ) : |
sets the the zoom value which should be between -1 and 1. This value is then translated to be from minimumZoom to maximumZoom. This lets you set appropriate minimum/maximum values then use a more intuitive -1 to 1 mapping to change the zoom.
|
|
worldToScreenPoint ( Vector2 worldPosition ) : Vector2 |
converts a point from world coordinates to screen
|
|
zoomIn ( float deltaZoom ) : void | ||
zoomOut ( float deltaZoom ) : void |
Method | Description | |
---|---|---|
updateMatrixes ( ) : void |
Method | Description | |
---|---|---|
onSceneRenderTargetSizeChanged ( int newWidth, int newHeight ) : void |
when the scene render target size changes we update the cameras origin and adjust the position to keep it where it was
|
public onEntityTransformChanged ( |
||
comp | ||
return | void |
public screenToWorldPoint ( Point screenPosition ) : Vector2 | ||
screenPosition | Point | Screen position. |
return | Vector2 |
public screenToWorldPoint ( Vector2 screenPosition ) : Vector2 | ||
screenPosition | Vector2 | Screen position. |
return | Vector2 |
public setMaximumZoom ( float maxZoom ) : |
||
maxZoom | float | Max zoom. |
return |
public setMinimumZoom ( float minZoom ) : |
||
minZoom | float | |
return |
public setPosition ( Vector2 position ) : |
||
position | Vector2 | |
return |
public setRotation ( float radians ) : |
||
radians | float | Radians. |
return |
public setRotationDegrees ( float degrees ) : |
||
degrees | float | Degrees. |
return |
public worldToScreenPoint ( Vector2 worldPosition ) : Vector2 | ||
worldPosition | Vector2 | World position. |
return | Vector2 |