# Tagged Questions

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

62 views

### Find out which way to rotate based on current rotation and final rotation [duplicate]

I have one object that I want to rotate to a certain angle with 'smooth' rotation. I looked up on how to solve that and I came up with this: enter image description here But how do I know in what ...
951 views

### Rotating a GameObject around its center

I'm trying to rotate a GameObject that consists of several cubes around its center of gravity on an axis. When using transform.Rotate(), it rotates around its pivot point (as shown in picture 1) and ...
161 views

### Jittery Rotational Movement with Arcball implementation

I have an assignment where I need to implement arcball using Opengl (~2.0). I have it more or less implemented but I have a some problems/issues/bugs and I'm not sure whats either causing them or how ...
465 views

### How do you calculate the rotational velocity of a flying object?

When a arrow shaped object is fired it slowly adjusts it's rotation to match the direction it is moving. But what is the actual physics behind it? The question is: How many degrees does the ship ...
391 views

### lerp z rotation towards mousepointer

I am trying to get transform.rotation.z to chase the mouse pointer at a rotation speed. But I get a very weird results and can't figure out what I am doing wrong. var mp = Input.mousePosition; ...
45 views

### Calculating Friction due to rotation from ball bounce? [duplicate]

In this question asked by codemonkey, The rotation will depend upon: upon impact, on: Initial Speed of the ball hitting the surface (magnitude of ball velocity vector) Friction co-efficient of ball ...
54 views

### How should I model rotation caused by bounce friction? [duplicate]

In my Java2D simulation, I have a disc which, when it bounces off the boundary of a 2D region, begins to rotate, as if it had gotten some spin from the wall. I'm having trouble relating the ...
523 views

### How to make bullets follow a rotating sinewave pattern

I am trying to replicate the wave gun from Super Metroid where the bullets fly along a sine wave path. The cool part is that you can shoot in 8 directions and the bullet still follows the sine as if ...
412 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) * Matrix.CreateRotationX(...
1k 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 ...
85 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 ...
301 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: http://www.java-gaming.org/index.php?...
1k 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 ...
165 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 angle?...
36 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 ...
448 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 ...
2k 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)?
252 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 ...
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 ...
320 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 ...
86 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 ...
49 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 ...
12k 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 ...
412 views

1k 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). ...
9k 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 ...
2k 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 ...
529 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 ...
37 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 ...
429 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, down,...
710 views

### Making player movement direction follow players facing direction

if (controller.isGrounded) { moveDirection = new Vector3 (Input.GetAxis ("Horizontal"), 0, Input.GetAxis ("Vertical")); moveDirection = transform....
2k 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 ...
182 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: ...
1k 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 ...
4k 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. ...
1k 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. ...
1k 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 ...
55 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 ...
423 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 ...
494 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) ...
724 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 ...
426 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, ...
439 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: ...
3k 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 ...
76 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 ...
1k 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 ...
841 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, I'...
1k 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 ...