The circular movement of an object around a specific axis.

learn more… | top users | synonyms

0
votes
1answer
302 views

(Quaternion based) Trouble moving foward based on model rotation

Using quaternions, I'm having trouble moving my model in its facing direction. Currently the model moves can move in all cardinal directions with no problems. The problem comes when I rotate the move ...
6
votes
1answer
271 views

How can I get a 2D texture to rotate like a compass in XNA?

I'm working on a small maze puzzle game and I'm trying to add a compass to make it somewhat easier for the player to find their way around the maze. The problem is: I'm using XNA's draw method to ...
2
votes
2answers
3k views

Rotate sphere in Javascript / three.js while moving along x/z plane

I have a sphere/ball in three.js which I want to "roll" around on the x/z plane. For the z axis I could simply do this no matter what the current x and y rotation is: sphere.roll_z = ...
6
votes
3answers
1k views

How can I make a character move forward in a certain direction?

I have an entity class which is updated every game tick. Let's just assume said entity moves forward constantly. What i want to know is, how can i make it so that i can give an angle to a function and ...
9
votes
1answer
1k views

Xbox thumbstick used to rotate sprite, basic formula makes it “stick” or feel “sticky” at 90 degree intervals! How do you get smooth rotation?

I am using a very basic formula to calculate what angle my sprite (spaceship for example) should be facing based on the Xbox controller thumbstick i.e. you use the thumbstick to rotate the ship. In ...
0
votes
1answer
176 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
520 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 ...
3
votes
2answers
396 views

How to derive euler angles from matrix or quaternion?

Currently working on steering behavior for my AI and just hit a little mathematical bump. I'm in the process of writing an align function, which basically tries to match the agent's orientation with ...
8
votes
2answers
333 views

Render 3d object to 2d surface (embedded system)

i am working on an embedded system of a sort, and in some free time i would like to test its drawing capabilities. System in question is ARM Cortex M3 microcontroller attached to EasyMX Stellaris ...
6
votes
2answers
1k views

How to implement friction in a physics engine based on “Advanced Character Physics”

I have implemented a physics engine based on the concepts in the classic text Advanced Character Physics by Thomas Jakobsen. Friction is only discussed very briefly in the article and Jakobsen himself ...
1
vote
1answer
631 views

Scene graph in Unity3D

I was wondering if any scene graph-like mechanism is implemented into Unity3D? For example if I have a GameObject, can I add child cubes to it so when I rotate the parent GameObject, the siblings will ...
1
vote
0answers
219 views

Getting and Setting Rotation in XNA around the Center of my Model with XNA

Alright, so I'm currently debating how I want to do this. Basically this is what I'm trying to accomplish. I've created a system to allow me to make my environment a little bit easier. I'm ...
1
vote
2answers
2k views

Rotation matrix derived from quaternion is opposite of expected direction

When I calculate a rotation matrix from a quaternion, it seems to be in the opposite direction. For instance: For a rotation of +45 degrees about the Y-axis, I would expect to get the following ...
1
vote
1answer
1k views

Vector movement in space type game (Mouse rotation)

I'm having an issue with my movement in my 'game' prototype. It's basically not working and admittedly my knowledge with vectors is lacking. The issue I'm running into is that the ship won't move in ...
3
votes
1answer
692 views

Rotating To Face a Point

I am trying to rotate a line to point to the mouse's world coordinates (rather where the mouse lies on the plane where y=0). I am running into a couple of problems though: Whilst it follows the ...
3
votes
3answers
928 views

How to Align Gun with Bullets

I have a top-down 2D shooter. I have an image of a player holding a gun, that rotates to face the mouse. Please note that the gun isn't a separate image tethered to the player, but rather part of the ...
1
vote
3answers
304 views

Inverting matrix then decomposing gives different quaternion than decomposing then inverting the quat

I'm getting different signs when I convert a matrix to quaternion and invert that, versus when I invert a matrix and then get the quaternion from it: Quaternion a = Quaternion.Invert(getRotation(m)); ...
1
vote
2answers
219 views

How can I determine the direction of turn?

I want a function that gives me the turn direction for my object (1 or -1) I have two angles 1 - current rotation(A) 0 <= A <= 360 2 - target rotation(B) 0 <= B <= 360 int turnSide ...
2
votes
1answer
405 views

Finding a suitable axis-angle to avoid gimbal lock

In OpenGL the camera faces the -z axis with the +y axis pointing up. I am using quaternions to represent the orientation of my objects (which works well) and am trying to do the same for the camera. I ...
3
votes
1answer
3k views

Angle between two points

I have a character who walks to random points in my room in Unity. The problem is he always faces one direction, I want to write in C# a piece of code that will get the direction the character is ...
0
votes
1answer
417 views

Character rotating around target

I'm using xaitment plugin for Unity as the AI for a demo level but I have a problem. My character is supposed to walk to random points but while it's walking there it's rotating around the point. I ...
2
votes
1answer
608 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 ...
0
votes
1answer
392 views

Joystick example problem for android 2D

I've searched all over the web for an answer to this, and there are simular topics but nothing works for me, and I have no Idea why. I just want to move my sprite using a joystick, since I'm useless ...
0
votes
2answers
771 views

XNA - positioning after rotation

I have a turret with a 2 gunbarrels. The turret rotates towards my mouse. So far no problem. When it creates a few bullets and positions them at the end of the gun barrels. Here is the problem. It ...
3
votes
1answer
375 views

Smoothing rotation

I've spent the last three days trying to work out how to rotate a sprite smoothly depending on the velocity.x value of the sprite. I'm using this: float Proportion = 9.5; float maxDiff = 200; float ...
0
votes
1answer
209 views

Rotation based on x coordinate and x velocity?

-(void) accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration { float deceleration = 0.3f, sensitivity = 8.0f, maxVelocity = 150; // adjust velocity based on ...
6
votes
3answers
647 views

Tetris : Effective rotation

I rotate each piece by rotation formula. More detail, because rotation angle is 90 so : xNew = y; yNew = -x; But my method has met two problems : 1) Out of box : each type of pieces is fit in ...
7
votes
3answers
2k views

How to keep my Quaternion-using FPS camera from tilting and messing up?

I am using an FPS-like camera, and it uses quaternions. But, whenever I try looking up and then sideways, it tilts, and sometimes it can turn upside down. How can I fix this?
0
votes
3answers
523 views

Rotating Sprite around Y-Axis (2D)

I'm going to be creating a game soon, and part of it involves spinning sprites. The sprites will be spinning around the Y-Axis (imagine a spinning plate on top of a stick, where the stick stands up ...
7
votes
1answer
580 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 ...
1
vote
1answer
261 views

rotating an object on an arc

I am trying to get a turret to rotate on a 90 degree arc (rotating about 2 orientations about the y-axis), and have hit a wall. I have 8 possible starting orientations (multiples of 45 degrees about ...
0
votes
2answers
893 views

Rotate object Up/Down/Left/Right in any orientation

I'm rendering model at the origin with a fixed camera looking at it positioned on the z axis. I want to be able to rotate the model up/down and left/right. Currently I have 2 variables, ...
0
votes
1answer
222 views

Earth's rotation along it's axis

I've modeled an earth using an sphere. I can rotate it using glRotatef function around z axix by incrementing the angle. How do I simulate earth's movement which looks like 23.5Degree around Z axis? ...
-2
votes
2answers
178 views

C# XNA 4.0 Rectangle Rotation Collision

I can easily rotate my sprite, but how could I rotate my rectangle for my collision (Thinking of using the Separating Axis Theorem, But I have no clue how to apply it) Help or Example would be ...
0
votes
1answer
277 views

Quaternion to axis-angle, or ripping apart a full transform matrix

My game entities currently hold a quaternion for their orientation with the ability to return either a 3X3 full rotation matrix (based on that quaternion), or a full 4X4 transform matrix. though what ...
1
vote
3answers
1k views

XNA create differences in enemies

I created an enemy class for my game. It works well, except for one dilemma. When I spawn more than one enemy, eventually they begin to "overlap" and look like one enemy. I was wondering if anyone had ...
4
votes
1answer
2k views

Moving a rotated model in XNA

This seems like a simple problem with an equally simple solution that is invisible to me. I have a model that spawns at the origin and looks at my player model wherever it goes. I would like it to ...
1
vote
4answers
2k views

Rotating a model AND translating it forward in XNA

I have this enemy class, and I want it to 1) Spawn at a certain place Vector3 pos 2) Rotate to face my player position 3) Move forward As this code is now, it will appear at it's specified place: ...
7
votes
2answers
1k views

Calculating a quaternion so a bone points in a specified direction

In an attempt to solve this question, I decided to figure out the absolute (world space) directions of each joint in the source pose (as normalized unit vectors), and then rotate the joints of the ...
0
votes
1answer
757 views

Camera Rotation (for mouse look) with LookAt does not work as expected (Local/Global)

My code for rotating my 3D fps camera isn't working as expected. I expect that the X-axis does rotate with the Y-axis, but it ain't so. I made some pictures to explain it better, I think its doing ...
0
votes
1answer
111 views

Creating a 2D Line Branch (Part 2)

Yesterday i asked this question on how to create a 2D line branch; Creating a 2D Line Branch And thanks to the answered provided, i now have this nice looking main branch; *coloured to show the ...
2
votes
1answer
1k views

Flip rotation matrix

I'm doing character control with kinect. I need to mirror the joint orientation because the character faces the player. Somehow by Googling through internet I've done it and everything works very ...
6
votes
2answers
1k views

Simple thruster like behaviour when rotating sprite

I'm prototyping some 2D game concepts with XNA and have added some basic keyboard inputs to control a triangle sprite. When I press key up the sprite accelerates in it's current facing direction, ...
1
vote
2answers
718 views

Matrix rotation of a rectangle to “face” a given point in 2d

Suppose you have a rectangle centered at point (0, 0) and now I want to rotate it such that it is facing the point (100, 100), how would I do this purely with matrix math? To give some more specifics ...
3
votes
2answers
530 views

Passing an objects rotation down through its children

In my topdown 2d game you have a player with a sword, like an old Zelda game. The sword is a seperate entity, and its collision box "rotates" around the player like an orbit, but always follows the ...
4
votes
1answer
570 views

Arcball Problems with UDK

I'm trying to re-create an arcball example from a Nehe, where an object can be rotated in a more realistic way while floating in the air (in my game the object is attached to the player at a distance ...
1
vote
1answer
375 views

OpenGL: Rotating cannon about non-centre position?

So I have a "cannon" object (basically a long cylinder) and I want to be able to control its angle. The code I have now is: glPushMatrix() glTranslatef(self.position.x,2.5,self.position.z) ...
2
votes
5answers
2k views

How to make something rotate a certain amount over an exact amount of time

I'm trying to make a plane rotate down a certain amount and 180 degrees horizontally over 2 seconds. Basically I want it to take the plane 1 second to rotate to a horizontal-facing angle, then take ...
5
votes
3answers
719 views

Rotate a particle system

Languages / Libraries in use: C++, OpenGL, GLUT Okay, here's the deal. I've got a particle system which shoots out alpha blended textures to produce a flame. The system only keeps track of very ...
1
vote
1answer
2k views

Moving an image by rotating and increasing y axis causes a trailing issue

Forgive me if me anything is unclear, this is a tricky thing for me to explain. In an applet I draw a little ship gif. I have it so I can rotate the object and then increase or decrease the y axis to ...