Announcement
Collapse
No announcement yet.
My XNA game
Collapse
X
-
Re: My XNA game
Thanks!
here's the snippet for the rotation & speed vectors
Code:if (modelRotation >= (MathHelper.Pi*2)) { modelRotation = 0.0f; } if (modelRotation < 0) { modelRotation = (MathHelper.Pi * 2); } modelRotationstr = Convert.ToString(modelRotation); speedx = (Math.Sin(modelRotation)) * 30; speedz = (Math.Cos(modelRotation)) * 30; float speedxdouble, speedzdouble; speedxdouble = (float)speedx; speedzdouble = (float)speedz; KeyboardState keyboardState = Keyboard.GetState(); if (keyboardState.IsKeyDown(Keys.Up)) { shipPosition += Vector3.Forward * speedzdouble; shipPosition += Vector3.Left * speedxdouble; } if (keyboardState.IsKeyDown(Keys.Down)) { shipPosition += Vector3.Backward * speedzdouble; shipPosition += Vector3.Right * speedxdouble; } if (keyboardState.IsKeyDown(Keys.Left)) { modelRotation += 10 * MathHelper.ToRadians(0.1f); } if (keyboardState.IsKeyDown(Keys.Right)) { modelRotation -= 10 * MathHelper.ToRadians(0.1f); }
ok bai
Comment
-
Re: My XNA game
Originally posted by Bankock337 View Postthanks :)
omg 3d awesome video.
but you will get the complett sources public ?
You need Microsoft Visual C# (2010) and XNA library installedok bai
Comment
-
Re: My XNA game
I'm working with Ogre3D atm and havent got half as much done as you already have because I'm at work, keep up the good work!lolmaoman: Germans are born with a lifetime x22 login engraved into their birth certificates. True story.
Comment
Comment