08-31-2020, 10:07 PM
I have a bunch of boxes which i programatically select, and move my _targetPositionCamera to focus on using this line of code:
_targetPositionCamera.MoveTargetPositionTo(obox.CenterPosition, 1000)
It works really well and the animation helps the user understand where they are jumping to.
However when the user manually scrolls the view left or right using the mouse or the control panel, the line of code above doesn't bring the selected box into view because the control panel or mouse has shifted the focus so its no longer central.
There is no " .MoveTargetPositionTo" on the mouse and control panel cameras. how do I reset them to align with the _targetPositionCamera?
Note: In my constructor I have assigned:
_cameraControlPanel.TargetCamera = _targetPositionCamera
_mouseCameraController.TargetCamera = _targetPositionCamera
_targetPositionCamera.MoveTargetPositionTo(obox.CenterPosition, 1000)
It works really well and the animation helps the user understand where they are jumping to.
However when the user manually scrolls the view left or right using the mouse or the control panel, the line of code above doesn't bring the selected box into view because the control panel or mouse has shifted the focus so its no longer central.
There is no " .MoveTargetPositionTo" on the mouse and control panel cameras. how do I reset them to align with the _targetPositionCamera?
Note: In my constructor I have assigned:
_cameraControlPanel.TargetCamera = _targetPositionCamera
_mouseCameraController.TargetCamera = _targetPositionCamera