08-20-2020, 11:57 AM
I've tried to reuse the examples given but im struggling', i want the user to select a button and reframe on all elemnts just incase they slide the 3d model of the screen i would like to reset it back to the original camera location
thanks
Madxae
I tried this, but i get od results
thanks
Madxae
Code:
<cameras:TargetPositionCamera Name="Camera1"
TargetPosition="0 1000 0"
Heading="150" Attitude="-25" Bank="0"
Distance="250"
ShowCameraLight="Always"
TargetViewport3D="{Binding ElementName=MainViewport}"/>
Code:
//Adjustment factor = 20
private void FitIntoView()
{
Camera1.FitIntoView(ObjectsRootVisual3D.Children,
FitIntoViewType.CheckAllPositions,
false,
this._selectedAdjustmentFactor);
}
Code:
private void Btn_FitAllIn_Click(object sender, RoutedEventArgs e)
{
Camera1.TargetPosition = new Point3D(0, 1000, 0);
Camera1.Heading = 150;
Camera1.Attitude = -25;
Camera1.Bank = 0;
Camera1.Distance = 250;
//this.FitIntoView();
}