Animate 3D Graphic

This sample demonstrates how to animate a graphic's position and follow it using a camera controller.

Animate 3d graphic in a scene view


Click-and-drag to pan the SceneView, orbiting the moving plane. Click "Don't Follow" to switch to the default camera controller, which does not orbit the plane. The plane's route is shown on the inset map in the bottom left corner of the window. The progress through the plane's mission is shown in a slider at the top of the window. Drag the slider to seek through the mission (like you might seek through a song). The play speed can be adjusted to either be slower or faster using the slider in the panel on the right. There is a drop-down box on the top left part of the window for selecting a mission (route) for the plane. Note that this is a graphics-intensive sample; performance may be degraded in certain situations (such as viewing over Remote Desktop).


    d:DesignHeight="300" d:DesignWidth="300">
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="170" />
            <ColumnDefinition Width="170" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="150" />
        <esriUI:SceneView x:Name="MySceneView" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Grid.RowSpan="3" AtmosphereEffect="Realistic" />
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal" Margin="5">
            <ComboBox VerticalAlignment="Top" x:Name="MissionSelectionBox"  />
            <Button VerticalAlignment="Top" Click="MissionPlayPlauseClick" Margin="5,0,0,0" >Pause</Button>
            <TextBlock VerticalAlignment="Top" Margin="8">Progress:</TextBlock>
            <Slider x:Name="MissionProgressBar" Width="100" VerticalAlignment="Top" Minimum="0" Maximum="1" StepFrequency=".01" ValueChanged="MissionProgressOnSeek" />
            <Button VerticalAlignment="Top" Click="ToggleFollowPlane" Margin="5,0,0,0">Don't Follow</Button>
        <Border Background="White" Opacity=".7" Grid.Row ="0" Grid.Column="2" Margin="5">
            <StackPanel Margin="5" Opacity=".9">
                <TextBlock>Play Speed</TextBlock>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                    <Slider Grid.Column="0" ValueChanged="MissionPlaySpeedChanged" Minimum="0.5" Maximum="8" Value="1" x:Name="MissionPlaySpeedSlider" />
                    <TextBlock Grid.Column="1" Text="{Binding ElementName=MissionPlaySpeedSlider,Path=Value}" Margin="8" />
                <TextBlock FontSize="16" FontWeight="SemiBold">Stats</TextBlock>
                <TextBlock >Altitude:</TextBlock>
                <TextBlock Margin="5" x:Name="AltitudeTextBlock" />
                <TextBlock >Heading:</TextBlock>
                <TextBlock Margin="5"  x:Name="HeadingTextBlock" />
                <TextBlock Margin="5" x:Name="PitchTextBlock" />
                <TextBlock Margin="5" x:Name="RollTextBlock" />
        <esriUI:MapView x:Name="InsetMapView" Grid.Row="2" Grid.Column="0" Margin="10,0,0,25" IsAttributionTextVisible="False" />

In this topic
  1. Instructions
  2. Code