 |
CameraControllerChangeCameraDistance Method |
ChangeCameraDistance method change the distance of the TargetCamera by multiplying it by the changeFactor.
When RotationCenterPosition is set in the TargetPositionCamera or FreeCamera, then we zoom into the specified RotationCenterPosition (if this is not disabled by setting the zoomToRotationCenterPosition parameters to false).
Namespace: Ab4d.SharpEngine.UtilitiesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.1.9680+a1b1e43de1ad9a7e35472c33948d688d7b40ef79
Syntaxpublic void ChangeCameraDistance(
float changeFactor,
bool zoomToRotationCenterPosition = true
)
Parameters
- changeFactor Single
- changeFactor that is multiplied by the current TargetCamera Distance
- zoomToRotationCenterPosition Boolean (Optional)
- when true (by default) and the RotationCenterPosition is set in the TargetPositionCamera or FreeCamera, then we zoom into the specified RotationCenterPosition
RemarksChangeCameraDistance method change the distance of the TargetCamera by multiplying it by the changeFactor.
If the type of target camera is OrthographicCamera, then instead of changing the distance the CameraWidth is changed.
See Also