The circular movement of an object around a specific axis.

learn more… | top users | synonyms

0
votes
0answers
16 views

Arcball camera rotation

I need some help adding Arcball camera rotation in my LWJGL modern OpenGL game. Right now, I have a camera that follows the player. I want to be able to hold down the right mouse button and move the ...
0
votes
0answers
20 views

Rotation not as expected, perpendicular to expected one

I can't seem to get the rotation between two vectors right. I use the following: var quaternion = new THREE.Quaternion().setFromUnitVectors( (new THREE.Vector3( x1, y1, z1 )), (new THREE.Vector3( ...
2
votes
1answer
87 views

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

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 ...
-2
votes
1answer
50 views

How do I position a cylinder between 2 points? [on hold]

I found this code to draw a line between two mouse points. I want to do the same, but inverted; going in the other direction. The line should get larger from my first point toward the second. None ...
0
votes
0answers
37 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
79 views

3d game math problem

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
48 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
54 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
52 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 ...
0
votes
1answer
19 views

Sprite rotation in libgdx

Is it possible to rotate my sprite in LibGDX? public class Flame { private static final int FRAME_COLS = 6; private static final int FRAME_ROWS = 1; private Animation flameAnimation; private ...
1
vote
1answer
134 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
64 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
73 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
90 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
71 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
62 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
73 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
85 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
118 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
0answers
18 views

Reversed OpenGL ES 2.0 Rotation Code (Android)

My rotation code seems to be 'reversed' - I'll explain further... In all the tutorials / examples I've seen online, there is something like this: public void rotate(float centerX, float centerY, ...
0
votes
1answer
266 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
30 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
47 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
173 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
104 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
277 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
113 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
173 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
61 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
148 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
82 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
83 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
121 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
32 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
74 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 ...
0
votes
1answer
47 views

Get 3D quad rotation matrix from points

I have 4 3D points which represent a even quad in space. (So 3 points are sufficient) I need to get all the individual transformations (translation, rotation, dimensions) so that I can build that quad ...
2
votes
2answers
231 views

How can I simplify this code to compute the shortest rotation between two angles?

The following code will find the shortest rotation (in radians) (from pi to -pi) that I need to apply to from to leave me with to. Scalar rotationBetween(Scalar from, Scalar to) { Scalar fromMod ...
1
vote
0answers
32 views

Unity 2D angular velocity center [duplicate]

I try to add angular velocity to my GameObject with this command: rigidbody2D.angularVelocity = Random.value * tumble; All works, but I want center of velocity be in the center of my rigidbody, but ...
1
vote
0answers
89 views

Three.js camera turning leftside right

In Three.js I am trying to implement an orbiting camera can be rotated around the x and the y axis. I am using these two functions: function rotateX(rot) { var x = camera.position.x, ...
0
votes
0answers
49 views

Camera movement in Super Hexagon

I do realize there is no camera in OpenGL ES 2, but from my understanding you can simulate one using view and projection matrices. I'm using Android, by the way. Here's a video of the game, in case ...
0
votes
1answer
74 views

3d rotation of a Gunner unit to shoot the target

I'm developing a scenario to shoot incoming targets by a specific gunner unit, however I'm confused to actual logic of shooting an object with a gun. I'm working in 3D environment. I'v target's ...
2
votes
2answers
78 views

What are “local” and “global” rotations?

Each node in jME3 has local and global rotations, which can be expressed in quaternions. What are they? Documentation has no clues, about in which state rotations are zero?
0
votes
1answer
73 views

XNA 3D cube rotation problem

I am new to game programming and still trying to clear up my basics. I am stuck with a problem and unable to resolve on my own knowledge. I am trying to rotate a 3d cube in MonoGame (Similar to XNA) ...
0
votes
1answer
241 views

Libgdx Do a fixed rotation for orthographic camera

Im trying to rotate my orthographic camera in the render loop to a fixed angle, but I can only make the camera spin with the code I got: in the create OrthographicCamera camera = new ...
1
vote
2answers
88 views

Do I need to store a generic rotation point/radius for rotating around a point other than the origin for object transforms?

I'm having trouble implementing a non-origin point rotation. I have a class Transform that stores each component separately in three 3D vectors for position, scale, and rotation. This is fine for ...
1
vote
3answers
237 views

Rotation matrix for a 3D vector

I have a direction vector on which I have to apply some rotation to align it to positive z-axis. To use Matrix.CreateRotationX(angle) of XNA, I need the angle for which I'd have to compute cos or tan ...
0
votes
1answer
169 views

Repelling a rigidbody in the direction an object is rotating

Working in Unity, I have a game object which I rotate each frame, like so: void Update() { transform.Rotate(new Vector3(0, 1, 0) * speed * Time.deltaTime); } However, I'm running into problems ...
1
vote
1answer
274 views

libgdx rotation (animation, arrays) issues and help needed

well i am a noob at java and libgdx. i got the homing bullet working with the help of someone. now i am smashing my head as to how i can make it rotate so it faces the ball (which is the main ...