Rotation is the circular movement of an object around a specific axis.

learn more… | top users | synonyms

6
votes
0answers
238 views

Rotation pitch/yaw reverse problems when picking a tile (2.5D) [closed]

Set-up: 3D world, isometric sprite rendering (4 fixed angles). This transform matrix is used as camera: _transform = Matrix.CreateRotationZ(Roll) * ...
2
votes
1answer
712 views

How do I make an object face the mouse position, but only on one plane?

I want a game object to turn and look towards where the mouse was clicked (in world space). It works well when considering all 3 dimensions, but I really only care for the plane formed by the x and z ...
1
vote
1answer
55 views

Camera Aligned To Sphere Surface

I am writing a planet renderer and have come across a problem that is really limiting the usability of the program. When I am on the planet (anywhere but the north pole) I cannot rotate the camera to ...
0
votes
0answers
159 views

LWJGL Translation Problems with Matrix4f Class

I've just implemented a simple 3D Camera into my current game program using matrices and shaders. (I've basically just implemented the simple camera found here: ...
0
votes
1answer
441 views

LWJGL Camera Rotation Issues

I am quite new to LWJGL and OpenGL and I am trying to create an FPS camera. I had no problem with 2D stuff, so I decided to step things up and try and make some things in 3D. I have this 3D camera ...
2
votes
1answer
134 views

How do I rotate a bounding box together with a sprite?

I have a game object with a sprite that can rotate. It's a rectangle. I need its bounding box to rotate with it. How do I make sure that they can both rotate, but they're always both at the same ...
0
votes
0answers
35 views

Bounding box should rotate - Skews instead [duplicate]

I have a method to rotate a sprite's bounding box around the center of the sprite (the sprite rotates and I need the bounding box to rotate with it. The sprite is rectangular). Instead of being ...
1
vote
2answers
149 views

Detecting collision of two sprites that can rotate [duplicate]

I have a problem with collision detection in a 2D Java game. Normally, what I would do is create a getBounds() method for an object that can collide with other objects. This method would return a new ...
1
vote
2answers
228 views

How can obtain the relative orientation between two quaternions?

How do I obtain the relative orientation given two orientations (represented by quaternions q0 and q1)?
1
vote
1answer
129 views

pygame - avoiding sprite 'jitters' on rotating the image

Is there a common trick for getting around sprites that are changing directions 'too quickly' and causing their sprite to display erratically? In this project, the player moves in 8 directions by ...
-1
votes
0answers
51 views

Draw object to screen without being affected by rotation / zooming [duplicate]

I have a 2D game, with a camera that follows the main player. In the game the camera may also rotate the view around the player / zoom in or out on the player. Let's say I want to add a mini-map to ...
0
votes
2answers
202 views

Keep Mini map static after rotating / zooming with camera

Hi I am making a 2D game, where the Camera is able to rotate / zoom in or out on the camera focus (the player usually). However my game also contains a mini-map, and so far whenever I have to rotate ...
0
votes
2answers
75 views

Angluar movement

I'm making a little game where you are a spaceship and you fly around in 2d using the A and D key to rotate and the W key to accelerate. Now my problem is if i turn my ship it doesn't go into the ...
0
votes
1answer
40 views

Rotate final image with projection matrix

I'm trying to use space in my shadow (depth) maps in a more efficient way. If I could freely rotate the final image I get with projection matrix I could save a lot of pixels, but I don't know if it is ...
2
votes
1answer
3k views

Is it possible to rotate an image on an HTML5 canvas, without rotating the whole canvas?

So I basically want to rotate single sprites on the canvas without rotating the whole canvas, is that someway possible. I also don't want to create a new canvas for each object I have. Also, it ...
1
vote
1answer
99 views

PID controller error value for heading correction

I'm using a PID controller in my AI to steer my NPCs to a desired heading (by adding torque). I've adapted the code from here: ...
1
vote
4answers
478 views

How to set speed of circular motion

Edit 2 - clarification Just to clarify, the issue I have at the moment is how I specify a time (in seconds) for a complete revolution to occur. My delta is fixed and is 1/ticks per second (1/60). ...
4
votes
5answers
1k views

How to rotate an object around world aligned axes?

I have a Vector3 which has an euler angle for each axis. Usually, when I want to create a rotation matrix I will use functions such as D3DXMatrixRotationX passing the respective angle from my ...
0
votes
1answer
802 views

Rotation about a point in OpenGL ES 2 (Android)

I'm trying to implement rotation about a point (the origin) using quaternions. My camera is at (0, 0, 3). I'm applying all the operations to the view matrix. Basically my rotation is at the moment not ...
0
votes
1answer
130 views

up vector for quaternion

First, I know there's a question exactly like mine, and some ohter really close, but my implementation of the solutions didn't work at all. Ok, now to the question. I created some forms of camera ...
0
votes
0answers
36 views

Sprite rotation algorithm [duplicate]

I'm making a game where you have to plot a function to hit certain objectives. I already made the plotting function and the animation to display a tiny missile that travels above the function. My ...
0
votes
1answer
248 views

(XNA) 3D Model Rotation Angles

I'm currently in the process of making a 3d "semi" top down game, the camera comes in at a very high angle near 90 to show off the 3d models. I have a main character which can move in 4 axis (up, ...
1
vote
1answer
328 views

Making player movement direction follow players facing direction

if (controller.isGrounded) { moveDirection = new Vector3 (Input.GetAxis ("Horizontal"), 0, Input.GetAxis ("Vertical")); moveDirection = ...
0
votes
0answers
72 views

Using Angles (or rotation) with Vectors for Car physics

I've been reading this blog that explains basic linear algebra for game developers and I understand the basics of vector mathematics. I'm using vectors to create a car that simulates the very basic ...
2
votes
0answers
828 views

Arcball 3D camera

I have checked multiple threads before posting, but i havent been able to figure this one out. Ok so i have been following this tutorial, but im not using glm, ive been implementing everything up ...
0
votes
1answer
113 views

Rotation and translation like in GTA 1 OpenGL

Okay, so I have a figure in XZ plain. I want to move it forward/backward and rotate at it's own Y axis, then move forward again in the rotation's direction, like the character in GTA 1. Code so far: ...
1
vote
1answer
276 views

Converting 3 axis vectors to a rotation matrix [closed]

I am trying to get a rotation matrix (in 3dsmax) from 3 vectors that form an axis (all 3 vectors are aligned by 90 degrees each other) Somewhere I read that I could build a rotation matrix just by ...
2
votes
2answers
1k views

Rotate to a set degree then reverse and repeat in Unity

I'm making my first project in Unity, a simple game where touching objects adds points to the player's score. I'd like the objects to have a pleasant back and forth swaying animation on the Z axis. ...
0
votes
0answers
19 views

How to Point sprite's direction towards Mouse or an Object [duplicate]

I need some help with rotating sprites towards the mouse. I'm currently using the library allegro 5.XX. The rotation of the sprite works but it's constantly inaccurate. It's always a few angles off ...
5
votes
2answers
647 views

Rotating object around moving object/player in 2D

I am trying to implement a camera which rotates around the world around the player. I have found many solutions online to the task of rotating an object about the origin, or about an arbitrary point. ...
0
votes
3answers
281 views

What are the semantics of glRotate and glTranslate's parameters?

I have been trying to play with OpenGL after watching some tutorials and I don't understand how the glTranslatef and glRotatef functions work. I believe a simple picture would help me. I understand ...
0
votes
0answers
53 views

3D Box Collision Data Import

I'm trying to implement a collision system using oriented bounding boxes, using a center for the box, it's extents as a 3D Vector and a rotation matrix, which is all stuff I picked up online and seem ...
1
vote
1answer
186 views

Sprite rotation

I'm using OpenGL and people suggest using glRotate for sprite rotation, but I find that strange. My problem with it is that it rotates the whole matrix, which sort of screws up all my collision ...
7
votes
3answers
375 views

Slerping rotation mirrors

I rotate my game character to watch at the target using the following code: transform.rotation = Quaternion.Slerp(startQuaternion, lookQuaternion, turningNormalizer*turningSpeed/10f) ...
0
votes
1answer
299 views

Rotating object along bezier curve: not rotating enough?

I tried to follow the instructions from the threads on the forum (Cocos2d rotating sprite while moving with CCBezierBy) with Unity, in order to rotate my object as it moves along a bezier curve. But ...
0
votes
0answers
242 views

JavaScript 3D space ship rotation

I am working with a fairly low-level JavaScript 3D API (not Three.js) which uses euler angles for rotation. In most cases, euler angles work quite well for doing things like aligning buildings, ...
4
votes
1answer
279 views

Keep cube spinning after fling

So I've been trying to get started with game development for Android using Unity3D. For my first project I've made a simple cube that you can spin using touch. For that I have the following code: ...
0
votes
0answers
1k views

Drawing and rotating bitmaps (with transparency) efficiently in Android

I just started making a game for Android and I'm already having some issues regarding performance. You can imagine the game as being some kind of Tower Defense game with a top-view, and the enemies ...
0
votes
1answer
64 views

How to rotate two scaled objects

I have two objects. The head and tail of a future "grapple". The head and tail always point in the same direction. However, when I tried using scaled rectangles (that were bigger/smaller than the ...
0
votes
1answer
195 views

How to draw a rotatable and zoomable sphere?

My game is a sort of business simulation game of Earth, and I want the main interface to be just like a google earth view. Is there a way to do this with built in OpenGL features or do I have to ...
1
vote
1answer
481 views

Correct rotation with Quaternion

I have some problems with a rotating marble. I've tried it with Matrix.CreateFromYawPitchRoll and Matrix.CreateRotation but there were some problems, I think it's due to the Gimbal lock effect. So, ...
0
votes
0answers
263 views

OpenTK (OpenGL) Rotation around fixed axes?

How would I go about rotating things in 3-dimensional space along fixed axes? As OpenTK only seems to have rotation that modifies the other rotation, as in X affects Y & Z Y affects Z Z affects ...
3
votes
2answers
333 views

Using quaternions, how do I determine if an object is upside down from an original rotation?

Imagine this scenario: An object is laying flat on a horizontal surface, from this an original rotation is determined. Then the object is moved, and at some point flipped upside down and put back down ...
0
votes
0answers
56 views

camera panning problems with “modelviewer” camera

I have a camera that rotates around a center point using a rotation matrix and radius for the zoom from the object. I need to add right mouse button panning in. Here is the problem: when I change ...
0
votes
0answers
81 views

How do I ADD gravitation to a rotation matrix?

I have ported the Matlab script from https://instruct1.cit.cornell.edu/courses/bionb441/LSystem/ to POV-Ray and everything works fine (although I'm not quite sure why). To navigate a "turtle" through ...
4
votes
1answer
320 views

Why do these quaterion multiplications produce different results?

I am trying to use quaterions to modify the camera direction vector. This code works perfectly: glm::quat temp1 = glm::normalize( glm::quat((GLfloat)( -Input1.MouseMove.x * mouse_sens * time_step), ...
0
votes
2answers
488 views

Translate extrinsic rotations to intrinsic rotations ( Euler angles )

The problem I have is very frustrating: I am using the Jitter Physics library which gives Quaternion rotations, you can extract the extrinsic rotations but I need intrinsic rotations to rotate in ...
1
vote
1answer
756 views

Need to translate a Rotation Matrix to Rotation y, x, z OpenGL & Jitter for 3D Game

I am using the Jitter Physics engine which gives a rotation matrix: M11 M12 M13 M21 M22 M23 M21 M32 M33 And I need it so OpenGL can use it for rotation GL.Rotate(xr, 1, 0, 0) GL.Rotate(yr, 0, 1, ...
2
votes
1answer
1k views

Rotate image around a specified origin

I'm trying to rotate my Turret.png (small Gunhead with a laser in front) towards the mouses location on the screen. I tried just using my method for rotating projectiles towards the next step on their ...
1
vote
3answers
6k views

Unity3D Orbit around orbiting object (transform.RotateAround)

The best way to explain this is I'm attempting to make a small model solar system (not to scale or anything complicated, just simple rotation as a learning exercise). There's a sun, a planet, and that ...