1
vote
3answers
79 views

Rotation matrix for a 3D vector

I have a direction vector on which I have to apply some rotation to align it to positive z-axis. To use Matrix.CreateRotationX(angle) of XNA, I need the angle for which I'd have to compute cos or tan ...
2
votes
0answers
27 views

Xna 4 Model Rotation with inertia not working as expected with variable updates

I am trying to rotate a model with inertia damping with the keyboard. The code works great with a fixed time step but it doesn't behave the same with a variable update frequency. Update method: ...
-1
votes
1answer
305 views

XNA - 2D Rotation of an object to a selected direction

I'm trying to figure out the best way of rotating an object towards the directional input of the user. I'm attempting to mimic making turns on ice skates. For instance, if the player is moving right ...
-2
votes
1answer
2k views

Moving A Sprite In The Direction Its Facing XNA [duplicate]

There are many questions on this site that explain this except they seem to all be in Java. I want to move a sprite in the direction it's facing, in XNA. I know you must use Radians and lots of ...
0
votes
1answer
118 views

Making A Sprite Rotate To A Specific Angle XNA 4.0

I have a game that the character spins when you press either of the triggers on the xbox remote. Here's the code. if (gamepadState.IsButtonDown(Buttons.RightTrigger)) RotationAngle += ...
2
votes
1answer
861 views

How to convert pitch and yaw to x, y, z rotations?

I'm a beginner using XNA to try and make a 3D Asteroids game. Update: I'm having a slightly hard time describing this so I made a little animation to show what I'm talking about: ...
3
votes
2answers
1k views

How can I implement smooth rotation from one direction to another?

I'm having a problem with animating rotations with 1Matrix.CreateRotationY() with my basic 3D game. Based on where you click the mouse, I want the 3D object to rotate to that direction and then move. ...
0
votes
1answer
182 views

Move model forward base on model orientation

My model rotates on it's own Y-axis regardless of where it is in the world. Here are the controls for the left ThumbStick: UP (move model forward on Z-Axis) DOWN (move model backward on Z-Axis) LEFT ...
0
votes
1answer
552 views

rotating model around own Y-axis XNA

I'm have trouble with my model rotating around it's own Y-axis. The model is a person. When I test my world, the model is loaded at a position of 0, 0, 0. When I rotate my model from there, the ...
2
votes
1answer
658 views

XNA and Draw rotation

From Wikipedia the (image) conversion degrees / radians shows the quadrants so that the increase of radians causes a counter-clockwise rotation but when using the following code the sprite is rotated ...
7
votes
1answer
628 views

How To Approach 360 Degree Snake

I've recently gotten into XNA and must say I love it. As sort of a hello world game I decided to create the classic game "Snake". The 90 degree version was very simple and easy to implement. But as I ...
6
votes
3answers
755 views

Why is my model's scale changing after rotating it?

I have just started a simple flight simulator and have implemented Roll and pitch. In the beginning, testing went very well; however, after about 15-20 seconds of constantly moving the thumbsticks in ...