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

learn more… | top users | synonyms

0
votes
1answer
8 views

Libgdx rotate sprite with collision

Im making a game where I have an object in the center of the screen and then balls come out from the sides of the screen. When you touch the screen the object rotates 90 degrees clockwise and it has ...
1
vote
1answer
49 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
29 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
52 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
1answer
32 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
29 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
90 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
37 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
44 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
73 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
14 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
67 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
91 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
24 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
35 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
26 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
33 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
47 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
54 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
2answers
49 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
92 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
56 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
32 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
77 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
52 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
26 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
98 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), ...
0
votes
1answer
33 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 ...
0
votes
1answer
54 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
91 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
36 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
47 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
1answer
85 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
105 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
51 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
1answer
78 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
48 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
64 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, ...
0
votes
1answer
44 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 ...
1
vote
1answer
80 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
123 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
509 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 ...
2
votes
1answer
66 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 ...
0
votes
0answers
17 views

Child object looktowards waypoint

hi guys how can I let my child character looktowards upcoming waypoint which can be on curve,slopes,hill.I have tried sevaral scripts but they are not giving proper rotation across all direction.Most ...
2
votes
0answers
51 views

Rotating kinematic object around a moving point Box2D

I'm new at Box2D and I am making a simple game where you control the rotation of the maze and the gravity leads the ball to the exit. The game looks like: The problem: I want to rotate the maze, ...
0
votes
1answer
90 views

How can I adjust steer angle based on speed in Unity?

I'm following this (https://www.youtube.com/watch?v=kAEpLX3rfms) video on how to make a car in Unity. But my car doesn't lower the steering angle based on the speed of the video. The idea was that you ...
2
votes
0answers
86 views

smoothly recenter view over time

I'm currently using the Google Cardboard SDK for Unity to build a fighter pilot simulator. What I'm currently trying to do is recenter the view(CardboardHead) smoothly over time when the user looks ...
1
vote
3answers
41 views

Libgdx RotateToAction does not directly rotate between 179 and -179

It took me a bit of debugging to realize why I'm having trouble with my rotations and it seems that rather than just moving the 2 degrees between 179 and -179, it prefers to rotate all the way in the ...
0
votes
1answer
45 views

In unity, how do I rotate a vector in relation to the player?

I am making a radar script in a unity FPS game project I am making for class. I already have a working example of a radar script that works in relation to the player's position. However the rotation ...