 |
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: 3.1.9316+94bbd23b55747f096f056a5602f7dd90558b3673
Syntaxprotected 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.
Remarks[Missing <remarks> documentation for "M:Ab4d.SharpEngine.Utilities.CameraController.GetRotationCenterPositionFromPointerPosition(System.Numerics.Vector2,System.Boolean)"]
See Also