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

learn more… | top users | synonyms

0
votes
1answer
40 views

How to rotate (YAW) aircraft in XNA?

I'm developing a flight simulator based on Riemer's Blog tutorial (XNA C#). To control the aircraft, I use the following code: Quaternion additionalRotation = Quaternion.Identity; additionalRotation ...
4
votes
1answer
93 views

What direction is forward when the rotation is (0, 0, 0)?

I'm representing the rotations of my actors (or gameobjects) with euler angles (one float for each axis). And I've always considered the vector (1,0,0) (x,y,z) to be the actor's direction if all ...
0
votes
0answers
18 views

Java Slick2D rotating a Shape using transform(Transform.createRotateTransform())

I have spent most of the day trying to debug this tiny piece of code, and I can't for the life of me figure it out. I'm making a pong game for the Mini Ludum Dare currently going on. I am programming ...
0
votes
2answers
64 views

How to stop rotation every 90 degrees?

I was facing another rotation problem yesterday, that i managed to solve by rotating the object like this : transform.Rotate (speed * Time.deltaTime, 0, 0, Space.World); I tried almost every other ...
0
votes
1answer
35 views

How can I rotate a Transform over a specified time in a single line of code? [duplicate]

How can I rotate a Transform over a specified time in a single line of code? I have had a lot of trouble with this in the past. I wrote a script which rotates a Transform by a specified rotation ...
0
votes
0answers
14 views

Bike rotation freeze rotation

Hello im making a bike game and need it to stay up (doing a wheelie) without gravity knocking it down ive tryed freezing the rotations and turning off gravity and it dosent work, so not sure how to do ...
0
votes
0answers
14 views

2D smooth Rotation Unexpected

I am trying to get a smooth 2D rotation and this semi works but only in (-x, +y) I have tried using a lerp but I still get the same result. So I believe, it has something to do with the rot_z value ...
0
votes
1answer
21 views

Combining two independent rotations relative to the world frame

I am implementing a mouse rotation which works by accumulating the X-Y delta between frames to yaw and pitch rotation angles. The problem is that I wish rotations to be independent of each other. But ...
1
vote
0answers
70 views

How do I implement realistic recovery from weapon recoil?

I want to create an equation determining how fast a gun recovers back to its center after it has fired. I have a weapon system functioning based on constants (recoil amount, bullet spread, etc.) ...
0
votes
2answers
54 views

How to rotate a gameobject to the specific angle

I have tree model that is being rotating .After certain angle it should stop rotating.I have done a sample code.But the tree is not stopping. void Update () { //transform.Rotate ...
5
votes
2answers
259 views

How does glRotate affect the axes of the global coordinate system?

I am currently playing around with 3D transformations applied on a 2D context in LWJGL, to later be implemented in my game. So I managed to set up LWJGL well enough (scaling, translating, scaling and ...
0
votes
1answer
33 views

Matrix Rotation Only Works On one Axis At A Time

I have this function in my vertex shader. It makes a transformation matix out of a transformation matrix, a rotation and an intensity. It works just fine when setting the rotation of one of the axis ...
11
votes
3answers
253 views

Rotate object around fixed axis

I am trying to let the user of my app rotate a 3D object drawn in the center of the screen by dragging their finger on screen. A horizontal movement on screen means rotation around a fixed Y axis, and ...
0
votes
2answers
39 views

Gradual rotation of an object in Java

I'm using Java to learn some movement algorithm. I would like to implement the "wandering" algorithm, but in order to do it, i should understand how to rotate an Object gradually. Actually, my Player ...
0
votes
0answers
13 views

How can I track a leader vehicle at a specific angle and distance?

I am using Matlab and have code which allows a vehicle to find its way to certain coordinates chosen by the user. I now want to add a second vehicle which stays fixed at a specific distance and angle ...
0
votes
2answers
87 views

Vector3.Angle() Never Reaching 0

I'm having trouble understanding why with this script, Vector3.Angle() sometimes will never reach 0. This question comes from me trying to make a "turret" that rotates to face a target position. It ...
0
votes
0answers
49 views

Pre- or post-multiplication for rotation between coordinate frames

I have three 3D coordinate frames: O, A and B, as shown below. I want to know the rotation matrix RAB between A and B, that is the rotation that is required, with respect to the frame A, to move ...
0
votes
0answers
23 views

Rotating between two coordinate frames

I have two coordinate frames, A and B. I want to create the rotation matrix RAB which takes you from A to B. A is a right-handed system, and B is a left-handed system. Furthermore, after moving from a ...
0
votes
1answer
41 views

Rotate a plane defined by its normal and its distance

First apologies for the amount of pictures, it's a bit hard trying to explain my problem without pictures. Hope I've provided all the relevant code. If you feel you want to know about how I am doing ...
1
vote
0answers
50 views

Unintended twisting of geometry while generating a mesh?

I am creating a real time animation of tori (toruses), and I've run into a problem where at certain angles of my tori, the geometry is twisting up where it should remain straight. Here is an animated ...
-1
votes
2answers
73 views

Accelerometer bike game rotation help

Hi I've been making a game for the last few months and not sure what to do. It's a 2d bike game and I want the rotation done with accelerometer, at the moment To test on computer I've set the ...
0
votes
0answers
28 views

Quaternion Slerp Over Time Help

I've gathered some code from several places and the final result almost works correctly. However, at times there is noticeable "snapping" from one place in the rotation towards the finish or too ...
0
votes
1answer
50 views

Fps independent rotation [duplicate]

I'm trying in my game to have camera rotation speed idependent of fps. For keyboard it works without problems but not for mouse movoment. At 60 fps it works good but at 200 for example rotation is to ...
0
votes
0answers
32 views

Motion Blur (as per GPU gems article) only considers camera rotation, not translation

I am following this article and have implemented it exactly as described: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch27.html The problem is that things are only blurred when the camera is ...
0
votes
2answers
61 views

Rotating an object with quaternion

I have a question in regards to using quaternions for the rotation of my graphics object. I have a Transform class which has the following constructor with default parameters: Transform(const ...
2
votes
1answer
117 views

Project rotated matrix to isometric coordinate

I have a group of soldiers, and each has a vector describing their position in the squad. When the group rotates, I do this math to calculate the desired position of each soldier. var unitPositions : ...
0
votes
1answer
53 views

Affine transformation: rotate a plane parallel to another plane

I am writing a function that extrudes a 2D shape along a 3D spline, as found in 3D modeling software. I need a way of translating a set of points P so that they all lie in a new plane L (preserving ...
1
vote
0answers
30 views

Is there a way to rotate an Ellipse in libGDX for collision detection purposes?

I'm trying to avoid having multiple overlapping Circles for a UFO-shaped sprite. Two Ellipse objects will perfectly cover the shape of my UFO, but I want to tilt/rotate the UFO when flying left and ...
2
votes
2answers
70 views

Translating an object in the rotation direction

I am creating a graphical scene with OpenGL and SDL, and I'm running into a problem in regards to translating an object in its rotation direction. Each of the graphical objects in the scene has a ...
0
votes
0answers
68 views

Minecraft Forge 1.7.10 Modding: Using BlockPistonBase metadata as a determinant for facing direction

I've recently begun to revamp some old code that I've had lying around by utilizing a lot of what Minecraft already has available, but have run into a bit of an issue. I have this large chunk of code ...
0
votes
0answers
16 views

Java JBullet rotating rendered rigidbodies

Hello I wan't to rotate object I wrote some piece of code but that don't won't to work. Here is this code: glPushMatrix(); float[] matrix = new float[16]; ...
0
votes
1answer
28 views

How to compute the forward facing direction from three angles and then translate along it?

Given: float yaw, pitch, roll; How does one compute the forward direction: vec3 forward = computeForwardFromEulers(yaw, pitch, roll); Next, I would like to use this information to translate an ...
0
votes
0answers
47 views

Transformation order for augmented reality game using OpenCV and OpenGL

I'm trying to create a simple AR application where I'm augmenting the camera image of a Kinect with virtual objects that are tracked using an optical tracking system. The following picture ...
1
vote
2answers
148 views

How do I limit the rotation speed of a mouse-following object?

I am trying to make a 2D top-down game where player controls a spaceship. The spaceship (a rocket) is just a sprite following the mouse cursor with a fixed speed and is always pointing toward the ...
0
votes
1answer
66 views

How can I add banking and rotation to this object manipulation script?

I have made a drone script that allows user to move in four directions and ascend/descend. I found a nice tilt snippet which makes the thing bank when it moves. However, when I include this, the ...
0
votes
1answer
103 views

Camera Movement Smoothing

I am trying to smooth a camera I create in my game, but I can't seem to find a way to actually do this correctly. What I have : //Calculate the "current" Forward vector var cameraForward = ...
0
votes
2answers
77 views

Rotate can I rotate an object to a target angle using Euler Angles?

How do I rotate an object from its current angle to the desired angle in increments on 1 axis? The problem is the wraparound at 360 degrees What I have so far (Note: pseudocode): double MaxSpeed ...
0
votes
0answers
52 views

Trackball Rotation using Quaternions

I am trying to figure out rotations using quaternions. I am using a trackball that tracks the mouse when I click. So when I click on the right and drag to the left, the cube rotates around the y ...
1
vote
0answers
63 views

Circular movement of player in unity [closed]

I've got a shark as player object which I am trying to control using a script, wherein when I press a key, the shark moves in the desired direction along with the animation. The script works fine ...
2
votes
3answers
103 views

Hero made of parts 2d rotation

I have a problem with rotation of my hero in 2D space. The hero is made of body parts such as: head, arms etc. Every part is a separate sprite. When I want to rotate the hero, I have to rotate all ...
1
vote
2answers
92 views

Make square walk by rotating around corners

I in the very beginning of making a small game, and I'm having some problems getting the basic movement of my character. My character is a square that can be moved by rotating around a corner. The ...
0
votes
1answer
56 views

Rotating a 3d vector around an axis using sines and cosines

I am trying to represent a 3d cone light's direction using only 2 variables. Right now I represent it with two points (6 variables) but I know that the direction in 3d space can be represented by two ...
0
votes
0answers
28 views

Creating a ray with angle movement restrictions

In Unity is it possible to create a ray which has movement restrictions. As in creating a ray which is fixed to one point. When this point is moved around. The line is also moved around. But when the ...
0
votes
1answer
326 views

Sprite rotation LibGDX

I'am using the current mouse position to aim the player sprite, but I am not getting the best results. I want my sprite to have the direction pointed wherever my cursor is in the screen. Here's my ...
1
vote
1answer
184 views

Trouble With Quaternions and orbital camera:

UPDATED: I have been trying to implement a Orbital Camera of sorts in a engine I am currently doing in Unity3D, the issue being I can't seem to do the correct rotation no matter what. This is what it ...
1
vote
1answer
91 views

How to constrain axis-angle rotation?

I have a problem where I'm performing an axis-angle rotation and am trying to constrain my rotations. Specifically I have a skeleton (model/mesh with rig, transforms are hierarchy parented to pelvis ...
0
votes
0answers
352 views

Rotate object against Gyroscope in Unity

I would like to rotate a simple object against the z-rotation of the gyroscope of a smartphone, so that the object will always "look" to the physical floor where the user is standing. After that, I ...
1
vote
2answers
232 views

Quaternion Rotation - Clockwise or Counter-Clockwise?

when we specify a Quaternion as (axis of rotation, rotation amount), in which 'direction' is the rotation, assuming we are looking down the rotation axis (i.e. camera at the origin, looking along the ...
0
votes
0answers
161 views

libgdx y axis rotation (card flip)

I am a complete new user to libgdx and am looking to use it to write a simple card game. I want to be able to flip my cards over to reveal them, in the same way as this example from Google shows. ...
0
votes
1answer
136 views

Lookrotation of a gameObject in just one axis

So I am trying to orient a gameObject ( house in the picture below) which is nothing but a plane and has a 2d texture on it as you see below. The whole game is made on a hex sphere. I am using ...