title: ModelVisual3D Transform null when trying to move a object
body: <p>I am trying to move a cube clicking on it and tracking the mouse. My cube is implemented like this:</p>
  
  <p>App.xaml</p>
  
  <pre><code>&lt;MeshGeometry3D x:Key="solidCube" 
  Positions="2, 2, 2 -2, 2, 2 -2, -2, 2 2, -2, 2 2, 2, -2 -2, 2, -2 -2, -2, -2 2, -2, -2"
  TriangleIndices="0,1,2 2,3,0 3,4,0 7,4,3 5,4,7 7,6,5 1,5,6 6,2,1 2,6,7 7,3,2 1,0,4 4,5,1"/&gt; 
  </code></pre>
  
  <p>MainWindow.xaml</p>
  
  <pre><code>&lt;ModelVisual3D.Content&gt;
      &lt;GeometryModel3D x:Name="solidCubeGeometryModel3D" Geometry="{StaticResource solidCube}"&gt;
              &lt;GeometryModel3D.Material&gt;
                      &lt;DiffuseMaterial&gt;
                              &lt;DiffuseMaterial.Brush&gt;
                                      &lt;SolidColorBrush Color="Red" Opacity="1.0"/&gt;
                              &lt;/DiffuseMaterial.Brush&gt;
                      &lt;/DiffuseMaterial&gt;
              &lt;/GeometryModel3D.Material&gt;
              &lt;GeometryModel3D.Transform&gt;
                  &lt;TranslateTransform3D x:Name="myTranslateTransform3D" OffsetX="0" OffsetY="0" OffsetZ="0" /&gt;
              &lt;/GeometryModel3D.Transform&gt;
      &lt;/GeometryModel3D&gt;
  &lt;/ModelVisual3D.Content&gt; 
  </code></pre>
  
  <p>I have a TrackballDecorator around my viewport, which holds the events:</p>
  
  <pre><code>&lt;custom:TrackballDecorator x:Name="trackballDecorator"         Grid.Column="1"MouseLeftButtonDown="OnMouseLeftButtonDown"
  MouseMove="OnMouseMove"
  MouseWheel="OnMouseWheel"
  MouseLeftButtonUp="OnMouseLeftButtonUp"
  PreviewTextInput="OnPreviewTextInput"
  LostMouseCapture="OnLostMouseCapture"
  Width="600" Height="600"&gt;
  
  &lt;custom:Interactive3DDecorator Grid.Column="1"&gt;
  
  /// viewport etc... 
  </code></pre>
  
  <p>And my first event, OnMouseLeftButtonDown, I took from <a href="http://www.charlespetzold.com/3D/" rel="nofollow">http://www.charlespetzold.com/3D/</a>, example Mouse Tracking, which is:</p>
  
  <pre><code> protected void OnMouseLeftButtonDown(object sender, MouseButtonEventArgs args)
          {
          base.OnMouseLeftButtonDown(args);
  
          Point ptMouse = args.GetPosition(myViewport);
          HitTestResult result = VisualTreeHelper.HitTest(myViewport, ptMouse);
  
          // We're only interested in 3D hits.
          RayMeshGeometry3DHitTestResult result3d =
                              result as RayMeshGeometry3DHitTestResult;
          if (result3d == null)
              return;
  
          // We're only interested in ModelVisual3D hits.
          ModelVisual3D vis3d = result3d.VisualHit as ModelVisual3D;
          if (vis3d == null)
              return;
  
          // We're only interested in visuals with translate transforms.
          transTracking = vis3d.Transform as TranslateTransform3D; //NULL !!!!!!!!!!!
          if (transTracking == null)
              return;
  
          LineRange range;
          ViewportInfo.Point2DtoPoint3D(myViewport, ptMouse, out range);
          pointOriginal = range.PointFromZ(transTracking.OffsetZ);
          transOriginal = transTracking.Clone();
          isTracking = true;
          CaptureMouse();
          Focus();
  
          args.Handled = true;
      } 
  </code></pre>
  
  <p>I updated it, removing the overrides and put a object sender in the parameters. 
  Is there something very obvious which I am missing for my ModelVisual3D Transform being null?</p>
  
  <p>Thanks in advance, if you need any more information to help me, just ask :D</p>