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

learn more… | top users | synonyms

1
vote
0answers
21 views

3D 3-axes rotation into 3D 2-axes rotation

Hello everyone and thanks in advance to anyone who'll help me through this ! I am currently working on the Kinect V2 (for XBox One) to interact with an avatar. I'd like to use the rotation quaternion ...
0
votes
1answer
25 views

Rotating A 2D Cannon Based On Mouse Position [duplicate]

I'm creating a game like bubble shooter, I have a cannon which is in the image bellow: I want to rotate the cannon based on mouse position. So far I tried various solutions I found over the web but ...
0
votes
0answers
29 views

Faking Perspective/Depth using 3D images converted to 2D sprites - Can't work it out!

after a lot of searching/reading/viewing old school game videos I am still unable to work out how to achieve the effect I am after. I am currently working on a 2D "overhead view" sci-fi RPG, using a ...
1
vote
0answers
15 views

Inverse kinematic joint limits

I want to limit the joint angle of my character. I have just one issue i can't get the value of the joint limits of the human -i search about max, min angle of each joint in x and y but i can't get ...
0
votes
1answer
10 views

How to use rigitbody2d.AddTorque() in JavaScript? (unity2D)

I just want to know how to use rigitbody2d.AddTorque() and an example script would be great :D. I am trying to rotate a cube forever using it as a test.
1
vote
3answers
237 views

Projectile Rotation During Flight (Tank Game)

I have a tank firing projectiles into the air. I want the projectiles to be rotated relative to their position along their flight path. See the diagram I drew in the image below. At any given point ...
0
votes
1answer
20 views

THREE.JS: why is the rotation only applied on the last axis used?

my function: function rotateAroundWorldAxis2(object, radians1, radians2) { object.rotWorldMatrix.makeRotationX(radians1).makeRotationZ(radians2); // object.rotWorldMatrix; ...
1
vote
1answer
80 views

How to implement angled surface?

I'am trying to implement 2D platformer game inspired by N game. But the problem is I have no idea how to implement something like this: I have two ideas of how this could be implemented but i ...
0
votes
0answers
37 views

Simulate a velocity sensor attached to a softbody node with bullet physics

I try to implement a virtual three-axis velocity sensor attached to a softbody node. The node already provides it's global position, normal and velocity, but how to calculate it's local velocity to ...
0
votes
1answer
85 views

XNA 2D rotation Matrix offset/origin

I'm currently struggling with finding the offset for my original camera translation after I have applied a rotation for it. transform = Matrix.CreateScale(new Vector3(1, 0.75f, 1)) ...
1
vote
1answer
23 views

Quaternion rotations & transforms from global to local space

I am trying to solve this problem and getting no where, could really use some assistance. Rotation is defined as X (rotate left/right), Y(rotate up/down), Z(roll) Coordinates are X: Forward/backward, ...
2
votes
1answer
45 views

Unity 3D - Rotate towards object with random offsets

Title is a little confusing, but let me explain: I want to make the enemies look at the player, and shoot at him, with random precision, meaning that one time the enemy will shoot a little bit to the ...
0
votes
1answer
51 views

FPS horizontal smooth camera rotation

I have a problem, my camera is parented to the FPS Controller prefab, then there is a script I wrote for the rotation of the player horizontally by mouse movement, it all works but the rotation is ...
0
votes
0answers
28 views

Rotation matrix is being inconsistent with pitch and roll

I'm calculating the rotation matrix for a turret when it's at an angle in Javascript. I have XYZ co-ords for the turret and target with X being 90 degrees right, Y being straight ahead and Z being ...
0
votes
1answer
21 views

Rotating the view around the origin of the world coordinate system

In OpenGL (using shaders), I want to implement a system that will take the user's mouse as input, and then rotate the view about the origin of the rendered scene. So, I need to compute the view matrix ...
2
votes
2answers
145 views

Make camera follow and rotate with player without childing it

I want to have a camera, that follow the player, without childing it to the player object. So far I have this one line, that follows the player, but does not rotate with it (meaning the camera should ...
1
vote
2answers
76 views

How to make sprite move in any direction?

I have an arrow sprite that rotates based on where my cursor is pointed, I can only make it move up,down,left and right.How about in a diagonal way? //this is the rotation nt x=Gdx.input.getX(); ...
1
vote
2answers
59 views

Unity 3D - Confine a gun rotation within certain degrees

I am having troubles making my gun rotate up and down, and have limits, for example, I want the down limit to be 0 degrees, and the up limit to be 90 degrees. Currently I can't figure out how to ...
0
votes
1answer
53 views

Rotation in 3D space using Quaternion

System Configuration I have two simulation systems (which I am going to call Sim-A and Sim-B) where I am going to spawn an entity created in Sim-A inside Sim-B. Expected outcome The entity created ...
2
votes
3answers
54 views

Unity - Check if object is facing Vector3 coordinates

I am having a hard time figuring this out, I want to have objects that move around randomly, and when they get new coordinates to move towards, face them, and then move. Here's explained: Target ...
1
vote
3answers
31 views

How to rotate a whole rectangle by an arbitrary angle around the origin using a transformation matrix?

Suppose, I have a rectangle ABCD. Where, A(0,0), B(7,0), C(7,5) and D(0,5). I want to rotate the whole rectangle by theta = 50°. I know that, a rotation transformation matrix can be used to do ...
-2
votes
1answer
31 views

Which of these two rotation methods are better

Since I've been game devving the method of rotation ive employed has been this: setOrigin(screenWidth/2, screenHeight/2) theta = getTheta() // Cycles through 0 - 360 in radians cP = vec2(0, 0) ...
0
votes
0answers
54 views

Object Rotation with mouse around his axis using Quaternions

I faced a couple of days ago a gimball lock problem , trying to rotate an object on openGL 2.1. I have done some researches and found out that Quaternions could help me. So I implemented the class ...
2
votes
1answer
100 views

OpenGL 2.1 rotation , Gimball lock

I'm working on a little app for a school project , which should be manipulating 3D objects. And i'm stuck with the rotation , as i'm facing what i think is called the gimball lock ? here's a video I ...
2
votes
1answer
44 views

How to calculate if a point is contained in rectangular camera viewport with rotation?

I am working with my camera, and am trying to improve it so that I can calculate if a world point is on screen, taking rotation into account. Currently, my camera rectangle is calculated as so: ...
1
vote
2answers
46 views

Acceleration and Deceleration During Rotation

I'm attempting to have a sprite rotate in a way where its rotation speed increases until it has reached the halfway point in its rotation, to which it starts to slow down. I'm currently calculating ...
1
vote
0answers
34 views

How to calculate a quaternion rotation between 2 vectors with a specific final up vector?

I know you can calculate the quaternion rotation between 2 vectors with something like this after all the optimizations: quat quat::fromtwovectors(vec3 u, vec3 v) { vec3 w = cross(u, v); ...
0
votes
2answers
74 views

Player rotation issues (Player returns to default forward rotation after releasing keys)

So basically what is happening is that my player rotates and faces the direction that he is currently being steered toward (which is wonderful). But after I release, let's say the A key, meaning he is ...
1
vote
1answer
62 views

Why is the camera tilting around the z axis when I only specified x and y?

My goal is to program a camera to point towards the mouse cursor. I attached the following script to the Main Camera. using UnityEngine; using System.Collections; public class CameraController : ...
1
vote
2answers
48 views

Rotation before scaling image/Lower resolution rotation? (XNA/C#)

Currently, when I rotate the image using SpriteBatch.Draw() the image is rotated after it is scaled. Resulting in: Which is using the code public override void Draw(GameTime gameTime) { ...
1
vote
0answers
54 views

Hinge joint annoying wheels rotation in Unity

I try to made a little skate game prototype in Unity 5 and I just encountered an issue. I added a hinge joint between the board and each of the wheels couples (front and behind) so the board can move ...
2
votes
1answer
76 views

Problem with Rotation - C#/XNA

I have a projecile(Hook) and the tail of the projectile(yellow balls) TailProjectile class draws a ball at the exact position of the projectile(hook) and let it there until the projectile ends I'd ...
0
votes
1answer
34 views

How can I modify the UV co-ordinates on a texture so they converge to a point?

I'm building a roof visualiser app, where someone can take a picture of their roof, define its outline, then visualise a new roof texture on it. I'm generating a 3D plane that matches the roof ...
0
votes
0answers
33 views

Libgdx polygon ratating

I'm using polygons for collision detection. Here is the code: poly = new Polygon(verticies); poly.setOrigin(100,100); poly.setRotation(45); renderer.setColor(Color.GREEN); ...
1
vote
0answers
9 views

CanDraw in large hierarchical scene with rotation

I've been assigned to write small simulation visualization, that contains thousands of cubes (I know you heard that before). Now I'm working on optimization of stuff that takes place there, but ...
0
votes
1answer
49 views

Would Raycast suffice for a game clock based on sun position?

I need help with some logic in my script. I created a dynamic day/night cycle that works fine in itself, but I want to add a game clock that works off the initial position of the sun (Directional ...
2
votes
1answer
44 views

Separate rotation transform from parent

I have a hierarchy like this Body - Head - Arms Currently this works fine in that the Body's transformation is reacting as it should. Being children, the Head and Arms match the Body's ...
6
votes
1answer
89 views

How can I keep the clicked point under the mouse when rotating? (GLM)

I have a spherical mesh of radius 1, centered at (0,0,0) in world coordinates. I want to rotate the sphere so that the clicked point remains under the mouse at all times. However, I cannot find an ...
0
votes
0answers
43 views

I have a script that changes an object to a broken version of itself when clicked, but it keeps rotating the object

So I have made a script in unity that you put on an object and when you click the object it will delete the object and replace it with a broken one I made in blender. My problem is that when I click ...
2
votes
1answer
107 views

How to rotate an object along its trajectory path?

I have a missile launcher that uses initial velocity for the trajectory. I edit the launch angle from the editor, and then the script calculates the initial velocity required to land the missile to ...
0
votes
1answer
49 views

Rotation with respect to world instead of the object itself using Quaternion.Euler in unity

[Other answers on similar questions on stackexchange didnt help] This script is giving some weird outputs On running this script If I press rightarrow once followed by 's' the object rotates on 'z' ...
0
votes
2answers
500 views

Rotate an object smoothly by 90 degrees on key press in unity3D

[I saw few similar question on stackexchange but none is solving the purpose.] I want to rotate a 3D object by 90 degrees on different axis on respective inputs. For example if 'a' is pressed, the ...
0
votes
2answers
81 views

XNA Rotating a Rectangle?

I am in the process of making a giant shooter game and I have got to the point where I needed to use rectangles to detect bullets and giants hitting the player. I did that however, if you look at this ...
0
votes
1answer
49 views

glRotatef not rotating simple 2D triangle

I am new to OpenGL and am learning it for the purpose of some simulation that I am doing as part of my research work. I have been following the tutorials given at ...
2
votes
1answer
65 views

Increment grid by rotation

I'm currently working on a grid for snapping objects side by side. My current script is working fine, but only for game objects which haven't been rotated. Here is an example video of the problem: ...
0
votes
1answer
75 views

Free camera rotation in 3D space

I'm using a view matrix to do camera movement and rotation. viewMatrix = new Matrix4f(); viewMatrix.setIdentity(); Matrix4f.rotate((float) Math.toRadians(rx), new Vector3f(1,0,0), viewMatrix, ...
0
votes
1answer
77 views

LibGDX make an object rotate around something

I need to rotate and object, which should be a circle made up with a ShaderRender, around a specified point. In LibGDX there is a method or something which allow me to do this? If it doesn't exist how ...
3
votes
2answers
113 views

How do I calculate rotational impulses in rigid body collisions?

I'm writing a simple 2D physics engine to help me understand the inner workings of physics engines. I'm following Randy Gaul's tutorial which can be found here and It's been extremely useful and ...
2
votes
1answer
73 views

In XNA, how do I access a model's dimensions with code?

I'm trying to rotate a model around some axes, but this rotates it around the world origin. I understand that I need to translate the object relative to its own size before rotating it, but I don't ...
1
vote
1answer
153 views

unity3d - Instantiate and fire bullet realtive to player rotation in 3D

This is a top-down view but in 3D coordinates, I would like to instantiate and fire a bullet from the player's gun. This script is on a spawner object at the end of the barrel. Also tried putting the ...