Tuesday, October 09, 2012 10:23 AM
I am using xna with silverlight 5 to build a 3d application.
Microsoft.Xna.Framework.Input.Mouse.SetPosition(10,10) is throwing the following exception
"The method or operation is not implemented."
Can someone confirm if the implementation is available for this method or am I missing something here...
Wednesday, October 10, 2012 7:59 AMModerator
Hi, I tried to reproduce your scenario, but I can't find Microsoft.Xna.Framework.Input namespace under Microsoft.Xna.Framework. But when I create an new Windows Phone Silverlight and XNA Application or Xbox 360 Game (4.0), It works now.
So I search it on MSDN, Microsoft.Xna.Framework.Input namespace is not available for Silverlight, but you can use it in Xbox Game or Windows Phone.
Please feel free to let me know if you have any question.
Wednesday, October 10, 2012 10:48 AM
Thanks Johnson, I am trying to create a third person shooter with Silverlight and XNA.. The cross hair movement will be smoother if the mouse position can be set to center always.. and that is why I was looking at Mouse.SetPosition, and I see this cannot be done,
Any other recommendations that you are aware of which provides the same functionality ??
Sunday, October 14, 2012 9:50 AMModerator
Seems that you are building an game. I suggest you to install Microsoft XNA Game Studio and create a new project (Windows Game or Xbox 360 Game) which you can use XNA Framework and of course including Microsoft.Xna.Framework.Input.Mouse.SetPoint(,) method.
Or you can create a MyCrosshair Class represents the Crosshair which has X_Axis and Y_Axis properties, when the application is loaded, you can initialize its X_Axis and Y_Axis based on the Silverlight plugin size. (this is my own opinion)