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

learn more… | top users | synonyms

0
votes
1answer
149 views

Rotation around arbitrary vector (using quaternions?)

I currently have a camera which orbits a specific target object, always looking at it. The user can drag the mouse to move the camera left/right/up/down and the camera will move over the surface of a ...
0
votes
1answer
62 views

Rotate object with mouse look script

I would like to rotate an FPS camera slightly upwards during a shot as an effect of recoil, but the problem is that I have a mouse look script as well and I assume it prevents me from achieving the ...
1
vote
1answer
149 views

Unexpected quaternion rotation behavior

First off let me apologize for the vague title but I really couldn't think of a more descriptive one (maybe after reading this a more advanced user might be able to edit it). Alright, so I have been ...
1
vote
1answer
162 views

Rotation in animation not working

I have a model of an SMG with arms exported from Blender and set to generic rig in unity import settings. I was creating an animation for this model in Unity Animation tab, it included changes in ...
0
votes
0answers
63 views

Making the CCTV and its Detection Area Pointing to the Player on Unity 5

I am now playing with the Unity Stealth project. Goal I want to make the CCTV pointing to the player (a sphere) instead of playing its rotation.y animation when the CCTV detection area is detecting ...
0
votes
0answers
103 views

How to programmatically create an animation that linearly interpolate between two rotations?

I would like to programmatically create an animation that linearly interpolate between two angles (using the shortest path). I wrote the following code : Animation anim = gameObject.GetComponent<...
0
votes
2answers
167 views

Aiming direction using mouse

I'm using the following code to rotate my object using mouse, for aiming direction. The only problem with this is that it only rotates between 0 to 180 and not full 360 degrees. Can any help me locate ...
1
vote
1answer
64 views

Problems making a smooth character rotation

My character has an angle rotation, when the player touches the screen it automatically face to the place that the player touched, using atan2(y,x) and Math.radiansToDegrees methods, but I want it to ...
0
votes
0answers
64 views

NavMesh.SamplePosition() fails after rebaking NavMesh?

So today I was refurbishing a scene when this happened. After baking a new Navmesh the SamplePosition() returned only infinity. I tried a lot of things out but eventually went back to an older version ...
0
votes
2answers
104 views

Moving a ship forward from rotation

I am making a simple space simulator, where the player can control a ship using 2 controls, one for pitch and one for bank. The ship is properly rotated but I cannot figure out how to make the ship ...
0
votes
0answers
16 views

C++ Opengl rotation Rotating vector before transform still rotates around 0,0,0… In world position [duplicate]

So how should I get this to work in local position? (Ie, moving to 4,0,4 and rotating around 4,0,4 . (x,y,z)) Here is where I add models / verticies: glm::vec4 pos = glm::vec4(1.0); glm::mat4 ...
0
votes
0answers
89 views

libgdx limit angular speed

I'm working on my top-down game. y characters use pathfinding + steering behaviors(Arrive and FollowPath) to move. I've implemented my character class from libgdx SteeringActor class (from tests). So ...
1
vote
2answers
59 views

Increasing the rotation angle on a quaternion makes the rotation stop at a certain angle

I'm using the following code to change the rotation of an object: Quaternion rot = getRotation(); setRotation(make_quaternion_axis_angle(rot.v,rotationSpeed*dt)*rot) This code works as expected ...
1
vote
4answers
102 views

Rotate Sprite towards another sprite

I have a Sprite class like this: class Sprite { double rotation ; // in degrees 0-360 double x; double y; } I'd like to have one sprite to rotate to another point with a constant rotation ...
-1
votes
1answer
42 views

Rotation and Velocity vectors

I've looked through the suggested, but I can't see exactly what I need. I want to calculate the vector needed for forward motion of a rotated sprite. At the moment I have: sprite.Rotation = ...
-1
votes
3answers
47 views

Changing the central point for transform [duplicate]

I'm trying to rotate all sprites in the view port around a central character. I have made some progress, using the following I can get my ship to rotate around the coordinates 0,0, with the radius ...
-1
votes
2answers
88 views

Rotation, what is the Matrix?

From a previous question, thank you very much by the way, but what on earth is the Matrix of? I'm very new to Mono/XNA and finding any meaningful documentation is practically impossible. point = ...
0
votes
1answer
16 views

Rotating the playing field. (MonoGame) [duplicate]

My maths isn't as good as it should be, I need to pick up some reference books on Trig. Could someone give me an idea of the maths if I wanted to revolve many sprites around a central point? It's a ...
0
votes
1answer
182 views

How should I rotate vertices around the origin on the CPU?

I have tried using glm::rotate and such. glm::translate works fine, but rotate doesn't work (if I rotate before/after a translation). Here is my current setup: glm::vec4 Off = glm::vec4(0, 0, 0, 1); ...
2
votes
1answer
159 views

How to avoid Gimbal Lock on Rubik's Cube [duplicate]

I am making a Rubik's cube program. That will simulate a Rubik's cube. I am having problems with gimbal lock. I need to know how to avoid it. To my understanding I can either multiply the x, y, z ...
0
votes
0answers
29 views

how to pin down a sprite partly in unity?

I am working on a simple do not let the bombs hit the floor game for android. You control a stick which can rotate to left or right depending on where on the screen you touch (left or right). But I ...
1
vote
0answers
37 views

How to find or compute or look for overall/max RPM by simply checking for rotation?

I find it hard to determine the wheel RPM since I'm only making a simple 2D game of rotating object via Z-axis. I wanna try this solution but I got no change since I'm trying to find the RPM from a ...
1
vote
1answer
65 views

Problem finding correct value for Yaw

I use an Arduino and a 9dof sensor ( gyroscope, accelerometer and magnetometer ) and i'm trying to use the pitch, roll and yaw that the sensor gives me to rotate an object in unity. I managed to ...
1
vote
1answer
86 views

Should I store local forward/right/up vector or calculate when necessary?

I'm working on an object picking and translation/rotation/scale gizmos system in my engine where you select objects and perform transformations on them in a 3d editor-like fashion (e.g. Blender) In ...
0
votes
1answer
200 views

How to rotate a triangle towards the point in Qt?

I have an issue with items rotating. I have a point and a triangle which needs to be rotated with its apex point towards the taregt point. The right side of the picture represents how it is should to ...
-1
votes
1answer
146 views

How to pitch, yaw, roll, an object like a flight simulator in OpenGL?

I'm working on a college Graphics project using LWJGL (OpenGL in Java). I've done most of the scene but I got a problem in figuring out the jet's orientation. Here's how I tried it at the very ...
0
votes
1answer
81 views

Help With Rotating Turret and Muzzle Flare Sprites

I am making a top down game that involved tanks rotating their turrets and firing at other tanks. I have the turrets rotating independently of the tank itself about the center. However, I am now ...
4
votes
1answer
263 views

Rotate billboard towards camera

I'm trying to create a particle system in OpenGL, and as such I need to use billboards. I need these billboards to face the camera at all times. The tutorials I've been following only rotated the ...
0
votes
1answer
93 views

Rotations of a Rubik's cube

I made a Rubik's cube by arranging smaller cubes. Now I want to apply animations to it. For that I am choosing to use the Rotate class and set the angle of rotation and the axis of rotation,like this ...
0
votes
1answer
60 views

Rotation of a cube

I came across the statement "rotation about a pivot and an axis" in javafx. The axis is defined byPoint3D and the pivotX, pivotY and pivotZ are of double type. I could not form a relation about what ...
2
votes
1answer
115 views

Calculating rotation matrix for an object relative to a planets surface in MonoGame

I have a 3D planet and I would like to place models on the planet and have them start with a base rotation relative to the planet surface at their location. So a model at the north pole will have zero ...
1
vote
1answer
113 views

How to calculate a vector for multi-axis rotations from sphere coordinates?

I'm working on a SceneKit project in iOS, trying to rotate a sphere (representing a planet) so that a point at a given longitude/latitude coordinate is facing "forward" (i.e. that point moves to the {...
0
votes
0answers
85 views

Tweening back from arbitrary 3D rotation in javascript

I'm using a 3D javascript library to rotate the vertex of a 3D object with a classic 3x3 matrix, to an arbitrary angle in the 3D space, as depicted in the image below. For example, a first ...
1
vote
1answer
148 views

Quaternion rotation problems [duplicate]

I want to rotate my model and I have X and Y rotations. Here is my code: D3DXQUATERNION q, qrotation; D3DXQuaternionRotationAxis(&q, &D3DXVECTOR3(1.0f, 0.0f, 0.0f), m_matrixRotX*0....
0
votes
1answer
101 views

Rotate sprite direction Cocos2d

I want that my sprite go always forward, and you can only control his direction moving right and left (on 360 degrees). I don't know why, but the movement it's senseless. The constants to move and ...
1
vote
1answer
80 views

Rotation Continuity help

First the issue im having: Basically its the fact that the angles of a circle aren't continuous, they rise from 0 to 2pi then immediately fall back to 0. I want to make a game where the player ...
0
votes
1answer
215 views

Earth and sun - How to make the sun revolve around the earth in the following code?

I want to imitate the planetary system with Earth and Sun drawn as solid spheres on the same window. I have drawn the two: the earth as the bigger sphere and the sun as the smaller sphere. Now I want ...
0
votes
1answer
74 views

Strange Rotation in LWJGL

What I am trying to do is to create a Rubik's Cube game using LWJGL in Java. I have a lot of it done already, the only problem is the rotating. It just isn't working. I've tried multiple ways of ...
1
vote
3answers
68 views

Storing component vectors to avoid matrix and quaternion inaccuracies?

I read that I "should really be storing the component vectors (rotation, translation, scale) in addition to the quaternion and matrix forms." The reason for this is that, over time, compound numerical ...
3
votes
2answers
154 views

How to handle angles in an isometric game?

I am working on my first isometric game, and I am not sure how to go about angles and rotation. Basically, I want the player's forward movement and rotation to coincide with the isometric angles. I ...
1
vote
0answers
187 views

How can I shoot an arrow if I know the shot power and target?

I am trying to shoot an arrow at a target with a 100% success rate. Given the initial force applied to the arrow, the gravity, the location of the archer, and the location of the target, how can I do ...
2
votes
2answers
57 views

Strange behavior with transformation matrix

I'm fairly new to transformation matrices. I'm using them to translate and rotate nodes and their child nodes. The following code works when applied once, but shows strange behavior when applied many ...
3
votes
2answers
155 views

Rotate sprite along the angle between two objects

Im trying to make flames follow my object, I set the direction for my moving object using the points between it and another object (using static destination for testing). No matter what I do I ...
0
votes
0answers
80 views

Should I use animation or simple object rotation in this case

I'm making game where players control hover tanks using Unreal Engine 4. Tank have a turret which rotates around for aiming. Turret pivot/center of mass is not exactly in joint with rest of tank so it ...
2
votes
1answer
68 views

How do I create a rocket projectile that is “dropped”, then accelerates toward the enemy?

I'm making an Asteroids-like game. I've successfully implemented linear bullets. Now I want to add some rocket-styled bullets, with a certain flight path: The rockets should be "dropped" back first, ...
1
vote
1answer
116 views

Unity Animated Player Character Rotation Glitch

I was wondering if anyone experienced this issue in Unity with Mecanim-animated characters ... I have an animated player character with a third-person camera control (Game Camera from the asset store,...
1
vote
1answer
120 views

Transform.forward having problems after rotation

I have this script, void Update () { float pitch, yaw, roll; pitch = Input.GetAxis ("Mouse Y"); yaw = Input.GetAxis ("Mouse X"); roll=Input.GetAxis ("Roll"); ...
0
votes
1answer
251 views

Help me understand this vbo/rotation, and how its done opengl c++

Im pretty new to opengl, and I just cant figure out how to rotate this vbo/vao in 2d space. This is how I bind my coordinates: float points[] = { 0.0f, 0.10f, 0.0f, -0.10f, -0.10f, 0.0f, ...
4
votes
1answer
698 views

Tetris: 2D Rotation Matrix?

I'm creating a Tetris clone right now. I've got the tiles of tetromino stored as an std::array<tile, 4>. Each tile holds its (x,y) coordinates relative to the piece. For example, the t-block is: ...
2
votes
2answers
106 views

Euler adjustments between two quaternions

I have two quaternions, q1 and q2. If my object's current rotation is at q1, but I need to get it to q2, what would be the process to figure out how much rotation I apply to x, y, and z in order to ...