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

learn more… | top users | synonyms

-1
votes
0answers
8 views

Help Develop 3D Camera “LookAt” Method In JavaFX8 [duplicate]

[I know this question was supposedly answered, when asked by Grady 8 months ago (3D Camera Rotation), but I was unable to follow the solution, and I cannot get hold of Grady, so I am re-asking it with ...
0
votes
0answers
31 views

Cannot understand behaviour of BoundingFrustum created from projection matrix multiplied by rotation matrix [on hold]

I think that this must be something obvious, but I just cannot understand it. Please help. auto&& aspectRatio = 1.0f; auto&& distToNearPlane = 1.0f; auto&& distToFarPlane = ...
0
votes
1answer
37 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
21 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
38 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
136 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
28 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
62 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
182 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
30 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
61 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 ...
0
votes
1answer
217 views

2D sprite 360 degrees rotation according to the mouse

I am trying to make my top down character rotate according to degrees between its position and the mouse. I'm using this code: float xDiff = mouseState.X - (graphics.PreferredBackBufferWidth / 2); ...
0
votes
0answers
32 views

Applying angular velocity distorts model

I am calculating the orientation of a sphere through the following code wV = new Vector3(0, pi/2, 0); w = new Quaternion(wV, 0); // o is the current Orientation o.Normalize(); w = 0.5f * w * o; // dt ...
0
votes
3answers
95 views

How to calculate corner marks of a rotated rectangle?

I've got two elements, a 2D point and a rectangular area. The point represents the middle of that area. I also know the width and height of that area. And the area is tilted by 40° relative to the ...
0
votes
1answer
84 views

How to rotate and move a model in the direction it is facing?

I am not using Unity or XNA. Eventually, I will probably use OpenTK for graphics. But for the concept of a game I'm writing, I am using the console for keyboard input and visual logging of events, ...
0
votes
0answers
45 views

OpenGL ES 2.0 - Applying rotation to only specific quads within a batch

This problem seems fairly simple on the face of it: How, when drawing a batch of quads using a triangle strip, can I apply a rotation to only one or some of the quads. I've been looking at this ...
1
vote
0answers
63 views

Aligning a gameObject to position and normal of another gameObject inside Unity

So I am instantiating a GameObject (the one with cities and trees in the image below) and trying to align it to a hex tiles on a Sphere. So after I instantiate the gameObject, I ray-cast to get it ...
1
vote
1answer
69 views

Get quaternion between two objects on sphere

In a planetary gravity environment objects are represented in the following way: struct object { struct quaternion quat; // quaternion to represent the rotation between the object and the center ...
3
votes
2answers
189 views

How do I make a 2D race car turn smoothly? [duplicate]

I'm making a competitive 2-player 2D racing game for a school project. I'm struggling with the movements of my car: I made it a square for testing purposes and it can move left, right, up or down, but ...
0
votes
0answers
49 views

3d Rotation problem

I was given an interesting (but tough) problem to solve: In a game, you want to change the heading of an enemy by +30°. Construct a Rotation Matrix, Euler Angles and a Quaternion that would do this. ...
0
votes
0answers
105 views

3d game math problem [duplicate]

i'm very much new to 3d math operations. I know how to rotate 3d points certain degrees arbitrarily by any axis but we were given a strange problem to think on. I'll spare using actual numbers on ...
0
votes
1answer
76 views

3D Translations relative to 3D Rotations

I'm trying to program camera movement to be relative to camera rotation. (Forward is always forward, regardless of pitch, yaw, and roll) I want to be able to move forward, backward, left, right, up, ...
0
votes
1answer
82 views

Can't seem to get Sprite to face left in sfml c++

I am having some small issues getting my sprite character to flip around. Basically I have a character that can walk to the right.. I am looking to flip it so that it looks like it is walking left. I ...
1
vote
0answers
157 views

2D Rotation Transform Matrix Issues

I'm stuck on my computer graphics class homework. I'm sorry if this is not right place to ask. I think this is closest thing to computer graphics. My assignment is to create basic 2D colored ...
1
vote
1answer
166 views

Mouse click movement

I need to make realistic human movement (3D) using mouse click. Get mouse click point using Raycast. Smoothly Slerp to LookRotation. Move transform.forward. Everything works fine, except I have ...
1
vote
0answers
93 views

Rotating a scene around a fixed axis

I am looking for a way to move my scene so that when I translate forward/back/left right it moves directly up/down/left/right on the screen. Currently it does do that until I rotate (by anything ...
0
votes
2answers
94 views

Strange quaternion rotation

I was implementing some quaternion rotations in too my infant 3d game engine and the rotations were really strange? Excuses my cluelessness. Anyways this is what I have: static XMVECTOR ...
0
votes
2answers
102 views

Quaternion Rotation Help

So I'm making a little engine with DirectX 11 and C++. (Some other help from other API's as well) DirectX has this function XMMatrixRotationQuaternion(XMVECTOR quaternion). I know nothing about this ...
2
votes
2answers
84 views

How can I make an object move in four directions relative to its rotation?

I want to make a game object move in directions relative to the direction is facing. That is, If the user presses the "W" key the object goes "forward" if its presses "D" the object goes to its left. ...
0
votes
0answers
86 views

X, Y, Z rotation around camera

I'm making a 3d orthogonal-projected, game using painters' algorithm in java. I'm able to rotate the objects with incremental rotations (e.g. rotate all objects 10 degrees) using affine ...
2
votes
1answer
84 views

From 3d rotation, snap to nearest 90 directions

I have a 4x4 transformation matrix, made only from successive rotations and translations, and I'd like to "snap" my object to the "nearest" of the 24 orthogonal (multiples of 90 degree) rotations. ...
1
vote
1answer
100 views

How to rotate object not from it's center point but from it's another point?

I am new in unity and I am developing a game where I want to rotate my object I try this code for it. if(Input.GetMouseButton(0)){ if(Input.GetMouseButtonDown(0)){ ...
0
votes
0answers
17 views

How can I control the “speed” of a func_rotating object via Squirrel scripting in Portal 2?

I wish there was a better place to ask this, but I've ran out of ideas (after googling and finding nothing even close to what I'm looking for). I basically have this rotating platform. At the ...
0
votes
1answer
170 views

Why are my target-following objects rotated the wrong way?

I writing a script that would make my players reach a target destination. It looks like this so far: private void MoveTowardsGoal() { if (Vector3.Distance (reachGoalTarget.transform.position, ...
0
votes
1answer
801 views

Unity 2D, C# - Make object move diagonally by a certain angle?

I have a sprite object which I want to move in 8 directions. Left, Right, Up, Down, Left top, Right top, Left down, Right down. The view is 2D with a isometric projection. The difficulties I am ...
0
votes
0answers
49 views

Camera rotation issue Libgdx

I have a OrthographicCamera and I want to rotate 90° it, but when I rotate it seems to be shifted more to the right. Before rotation: http://postimg.org/image/tc9jpq9zr/ After ...
1
vote
1answer
48 views

Rotating a square rendered on a Bitmap

I'm writing a Software Renderer for fun/learning. Basically, it's just a giant array of integers which contain hexadecimal values (representing colour) that are rendered to the screen.... int ...
0
votes
2answers
339 views

Set new forward directions based on camera position

I have a 3rd person camera which can rotate around the player. When I look at the back of the player and press forward, player goes forward. Then I rotate 360 around the player and "forward ...
1
vote
1answer
295 views

Box2D body rotation with setTransform

I' having a problem rotating a body with setTransform(), The body has multiple sensors that should rotate with the player. The rotation works but it rotates around the bodys local 0,0 position instead ...
0
votes
1answer
513 views

How can I make my player move in the direction the camera faces?

I have a 3rd person camera which can rotate around the player. My problem is that wherever camera is facing, players forward is always the same direction. For example when camera is facing the right ...
0
votes
4answers
175 views

Accurate sprite rotation with mouse movement

I am using the current mouse position to aim the player sprite, but I am not getting the best results. It will often by off by a noticeable amount, or even a complete ~180 off if I go from one side, ...
0
votes
1answer
520 views

Simultaneously translating and rotating sprite in Unity

I have a 2D object (a PNG file I dragged onto the screen) which is a circle I would like to move left and right when the correct side of the screen is touched and have it rotate in the respective ...
1
vote
1answer
67 views

Gradually reduce speed

Basically I am working on following application of android version Party Games: Drinking Wheel For this I want to rotate wheel and want to stop wheel at specific point. But I want this with gradually ...
1
vote
2answers
189 views

What torque should I apply in Bullet to maintain a vertical orientation?

I have a RigidBody in Bullet. Each frame, I want to apply torque to correct its orientation toward an upright position (i.e. near-zero pitch and roll). I know its angular velocity and orientation. ...
2
votes
1answer
104 views

How can I trigger an event each time the rotation of my rigidbody2D is at a given value?

I would like to trigger an event each time my rigidbody2D is at a particular value. The event should only be triggered once for each given value per complete object revolution. Initial attempts at ...
0
votes
1answer
96 views

Rotating a vector around a vector in 3D space

I am trying to rotate a moon around a planet (the planet is also rotating around an axis) but I am having trouble doing so. I tried to make the model move through space like so: @Override public ...
0
votes
2answers
130 views

Why do we say things are rotated around the z-axis in a space graph?

I've embarked on a journey of game development. I need to learn lots of 3D terminology, since I want to make 3D games. I learned that X is to the right, Y is up, and Z is towards you. Then why when a ...
1
vote
0answers
49 views

PhysX - Revolute joint around unit vector

I'm using a right-handed coordinate system with (0,0,-1) = forward, (1,0,0) = right and (0,1,0) = up. PhysX version is 3.3.0. I have a unit vector which represents the axis around which my actor is ...
1
vote
1answer
26 views

Error in plane transformation

I have a bunch of coplanar points, who sit on plane P. I want to translate the plane to Q with the points upon. Here is what I do: I take three points from P, say a, b, c. Their centroid is denoted ...
0
votes
1answer
110 views

Rotation with XMMatrix to Rotation with XMFLOAT3

I'm rotating a Direction Light around a fixed object, so the light only contains a XMFLOAT3 to determine it's direction that it is facing. I have another object rotation using the variable Rotation ...