Move an object

Sep 16, 2011 at 5:00 PM

Hi everyone!

I've done some testing along the Balder video (
Now I wanted to move the cube only in the X coordinate but do not get it. Could you give me some idea?

Thanks in advance!

Sep 16, 2011 at 5:51 PM


To position the object do this:

cube.Position= new Coordinate(x, y, z);


To move smooth, use a silverlight DoubleAnimation, like this:

Storyboard sbTitle = new Storyboard();
DoubleAnimation da = new DoubleAnimation();           

da.By = 20;           

da.Duration = new TimeSpan(0, 0, 1);          //1 seconds     

da.RepeatBehavior = new RepeatBehavior(1);                  

Storyboard.SetTarget(da, cube);           

Storyboard.SetTargetProperty(da, new PropertyPath("(Node.Position).(Z)"));           


sbTitle.Completed += new EventHandler(sbTitle_Completed);  //Use this to triguer an event when animation stop...



Good luck :)

Sep 16, 2011 at 8:41 PM

fantastic! that's it!

thanks a lot!