我想在xna中创建一个游戏,我得到了一个我希望玩家围绕它移动的圆圈,正如你在下面的图片中看到的,它的工作除了我不喜欢的绘图部分 这里有一个图像链接http://s12.postimage.org/poiip0gtp/circle.png移动一个精灵来匹配xna中的一个圆圈的边框
我想把玩家对象放在圆圈的边缘,所以它看起来不像玩家站在空中
我这是怎么计算玩家的位置
rad = (degree * Math.PI/180);
rotationDegree = (float)((Math.PI * degree)/180);
currentPosition.X = (float)(Math.Cos(rad) * Earth.radius + (GraphicsDevice.Viewport.Width/2));
currentPosition.Y = (float)(Math.Sin(rad) * Earth.radius + (GraphicsDevice.Viewport.Height/2));
这是我画的球员
spriteBatch.Draw(texture,currentPosition, null, Color.White,rotationDegree, Vector2.Zero,1f,SpriteEffects.None, 1f);
谢谢。