|
CameraControllerGetRotationCenterPositionFromPointerPosition Method |
GetRotationCenterPositionFromPointerPosition methods returns a nullable Vector3 that is get by 3D hit testing of specified pointerPosition with the 3D objects.
If no 3D object is hit and calculatePositionWhenNoObjectIsHit parameter is set to true, then the returned Vector3 is calculated by creating a ray from pointer position and advancing in the ray direction for the distance from camera's position and camera target position.
The method is called when the RotateAroundPointerPosition property is true.
The method can be overridden to provide custom logic to get rotation pivot point.
Namespace: Ab4d.SharpEngine.UtilitiesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax protected virtual Vector3? GetRotationCenterPositionFromPointerPosition(
Vector2 pointerPosition,
bool calculatePositionWhenNoObjectIsHit
)
Parameters
- pointerPosition Vector2
- pointer or mouse position inside the SceneView
- calculatePositionWhenNoObjectIsHit Boolean
- when true and no 3D object is hit ("behind the pointer"), then the position is from pointer ray and camera's distance.
Return Value
NullableVector3nullable Vector3 that is get by 3D hit testing of specified pointerPosition with the 3D objects. If no 3D object is hit, then null is returned.
See Also