The circular movement of an object around a specific axis.
0
votes
0answers
35 views
aligning one triangle on top of another
Suppose I have two triangles P and Q and I have calculated the rotation matrix R and translation vector3 T between them which aligns Q on top on P. So now Q will be on top of P. Lets their new ...
1
vote
1answer
55 views
Making player movement direction follow players facing direction
if (controller.isGrounded) {
moveDirection = new Vector3 (Input.GetAxis ("Horizontal"), 0, Input.GetAxis ("Vertical"));
moveDirection = ...
0
votes
0answers
30 views
Using Angles (or rotation) with Vectors for Car physics
I've been reading this blog that explains basic linear algebra for game developers and I understand the basics of vector mathematics.
I'm using vectors to create a car that simulates the very basic ...
1
vote
0answers
101 views
Arcball 3D camera
I have checked multiple threads before posting, but i havent been able to figure this one out.
Ok so i have been following this tutorial, but im not using glm, ive been implementing everything up ...
0
votes
1answer
65 views
Rotation and translation like in GTA 1 OpenGL
Okay, so I have a figure in XZ plain. I want to move it forward/backward and rotate at it's own Y axis, then move forward again in the rotation's direction, like the character in GTA 1.
Code so far:
...
1
vote
0answers
51 views
Converting 3 axis vectors to a rotation matrix
I am trying to get a rotation matrix (in 3dsmax) from 3 vectors that form an axis (all 3 vectors are aligned by 90 degrees each other)
Somewhere I read that I could build a rotation matrix just by ...
2
votes
1answer
63 views
Rotate to a set degree then reverse and repeat in Unity
I'm making my first project in Unity, a simple game where touching objects adds points to the player's score.
I'd like the objects to have a pleasant back and forth swaying animation on the Z axis. ...
0
votes
0answers
14 views
How to Point sprite's direction towards Mouse or an Object [duplicate]
I need some help with rotating sprites towards the mouse. I'm currently using the library allegro 5.XX. The rotation of the sprite works but it's constantly inaccurate. It's always a few angles off ...
2
votes
0answers
97 views
Rotating object around moving object/player in 2D
I am trying to implement a camera which rotates around the world around the player. I have found many solutions online to the task of rotating an object about the origin, or about an arbitrary point. ...
0
votes
3answers
99 views
What are the semantics of glRotate and glTranslate's parameters?
I have been trying to play with OpenGL after watching some tutorials and I don't understand how the glTranslatef and glRotatef functions work. I believe a simple picture would help me.
I understand ...
0
votes
0answers
44 views
3D Box Collision Data Import
I'm trying to implement a collision system using oriented bounding boxes, using a center for the box, it's extents as a 3D Vector and a rotation matrix, which is all stuff I picked up online and seem ...
1
vote
1answer
72 views
Sprite rotation
I'm using OpenGL and people suggest using glRotate for sprite rotation, but I find that strange. My problem with it is that it rotates the whole matrix, which sort of screws up all my collision ...
7
votes
3answers
294 views
Slerping rotation mirrors
I rotate my game character to watch at the target using the following code:
transform.rotation = Quaternion.Slerp(startQuaternion, lookQuaternion, turningNormalizer*turningSpeed/10f)
...
0
votes
1answer
81 views
Rotating object along bezier curve: not rotating enough?
I tried to follow the instructions from the threads on the forum (Cocos2d rotating sprite while moving with CCBezierBy) with Unity, in order to rotate my object as it moves along a bezier curve. But ...
0
votes
0answers
113 views
JavaScript 3D space ship rotation
I am working with a fairly low-level JavaScript 3D API (not Three.js) which uses euler angles for rotation. In most cases, euler angles work quite well for doing things like aligning buildings, ...
3
votes
1answer
90 views
Keep cube spinning after fling
So I've been trying to get started with game development for Android using Unity3D. For my first project I've made a simple cube that you can spin using touch. For that I have the following code:
...
0
votes
0answers
27 views
How can I detect the order/type of Euler Angles system used in a game/movie editor
How can I detect the order and type of Euler Angles system used in a 3d game engine/movie editor?
I have no document, I can do experiments.
I detect Quaternions by Permute a quaternions to get 24 ...
0
votes
0answers
205 views
Drawing and rotating bitmaps (with transparency) efficiently in Android
I just started making a game for Android and I'm already having some issues regarding performance.
You can imagine the game as being some kind of Tower Defense game with a top-view, and the enemies ...
0
votes
1answer
50 views
How to rotate two scaled objects
I have two objects. The head and tail of a future "grapple". The head and tail always point in the same direction. However, when I tried using scaled rectangles (that were bigger/smaller than the ...
0
votes
1answer
122 views
How to draw a rotatable and zoomable sphere?
My game is a sort of business simulation game of Earth, and I want the main interface to be just like a google earth view. Is there a way to do this with built in OpenGL features or do I have to ...
1
vote
1answer
163 views
Correct rotation with Quaternion
I have some problems with a rotating marble.
I've tried it with Matrix.CreateFromYawPitchRoll and Matrix.CreateRotation but there were some problems, I think it's due to the Gimbal lock effect.
So, ...
0
votes
0answers
89 views
OpenTK (OpenGL) Rotation around fixed axes?
How would I go about rotating things in 3-dimensional space along fixed axes? As OpenTK only seems to have rotation that modifies the other rotation, as in
X affects Y & Z
Y affects Z
Z affects ...
3
votes
2answers
142 views
Using quaternions, how do I determine if an object is upside down from an original rotation?
Imagine this scenario: An object is laying flat on a horizontal surface, from this an original rotation is determined. Then the object is moved, and at some point flipped upside down and put back down ...
0
votes
0answers
33 views
camera panning problems with “modelviewer” camera
ok so I have a camera that rotates around a center point using a rotation matrix and radius for the zoom from the object. I need to add right mouse button panning in. Here is the problem when I change ...
0
votes
0answers
71 views
How do I ADD gravitation to a rotation matrix?
I have ported the Matlab script from https://instruct1.cit.cornell.edu/courses/bionb441/LSystem/ to POV-Ray and everything works fine (although I'm not quite sure why). To navigate a "turtle" through ...
2
votes
0answers
114 views
Use quaterions to move the camera direction according to mouse movement
I am trying to use quaterions to move the camera direction vector in the following way.
This code is perfectly working
glm::quat temp1 = glm::normalize( glm::quat((GLfloat)( ...
0
votes
2answers
137 views
Translate extrinsic rotations to intrinsic rotations ( Euler angles )
The problem I have is very frustrating:
I am using the Jitter Physics library which gives Quaternion rotations, you can extract the extrinsic rotations but I need intrinsic rotations to rotate in ...
1
vote
1answer
216 views
Need to translate a Rotation Matrix to Rotation y, x, z OpenGL & Jitter for 3D Game
I am using the Jitter Physics engine which gives a rotation matrix:
M11 M12 M13
M21 M22 M23
M21 M32 M33
And I need it so OpenGL can use it for rotation
GL.Rotate(xr, 1, 0, 0)
GL.Rotate(yr, 0, 1, ...
0
votes
1answer
108 views
Rotate image around a specified origin
I'm trying to rotate my Turret.png (small Gunhead with a laser in front) towards the mouses location on the screen. I tried just using my method for rotating projectiles towards the next step on their ...
0
votes
3answers
326 views
Unity3D Orbit around orbiting object (transform.RotateAround)
The best way to explain this is I'm attempting to make a small model solar system (not to scale or anything complicated, just simple rotation as a learning exercise). There's a sun, a planet, and that ...
1
vote
2answers
119 views
“Align” a rotation to a direction
Good day all.
I have a 3d object with a random rotation.
I can express that object's rotation both through a quaternion or through an euler rotation.
Then I have a vector3 normal that I get from a ...
-1
votes
1answer
91 views
Java moving image to where it is facing
I am trying to make an Asteroids type game.
I searched and tried everything to move an image along its angle (as radiant).
Using my knowledge of trigonometry I made the following calculation:
x += ...
0
votes
1answer
641 views
Rotate an object smoothly on the Y axis in Unity
I am attempting a simple script to swing a door open in Unity. This requires a smooth rotation of 90 degrees around the Y axis. I have seen that one way to do this is using Unity's Quanternion ...
0
votes
0answers
49 views
Tetris-like wall-kicking not working [duplicate]
So I'm making a falling-block puzzle game. It's not a Tetris clone, but the block clusters move in a similar fashion. I want to make it so that if you rotate against a wall, or against another ...
0
votes
1answer
102 views
Orbiting a camera around the Y axis whilst remaining up
I've been having difficulty with a problem which I thought was going to be a simple solution.
I have a camera facing downwards on a character. The can camera be lowered and when it's lowered it ...
0
votes
0answers
58 views
How do I find the rotation point given a touch anchor, new position and new rotation?
I've got an Cocos2d layer which anchorPoint, position and rotation (according to http://www.qcmat.com/understanding-anchorpoint-in-cocos2d/) vary when the pinch zoom gestures. Everything works fine.
...
0
votes
0answers
127 views
Direct3D Math, Yaw + Roll = Pitch?
I know this is an odd question, however I'm scripting for a game using DirectX9 and the only floating-point rotation 'functions' I have access to is Yaw(X) and Roll(Y) and I need the Pitch(Z)
The ...
0
votes
2answers
125 views
get the new vertices after rotating in JOGL
I had rotate an object with openGL (JOGL).
Is there a simply way how I can get the new vertices?
1
vote
1answer
74 views
Getting mousemovement despite mouselock - unity
I have lockcursor so the cursor doesn't leave the screen, but now i have to rotate an object based on mouse movement (think garrys mod item rotation) but the mouse cursor is obviusly locked to the ...
2
votes
1answer
135 views
Jittery Movement, Uncontrollably Rotating + Front of Sprite?
So I've been looking around to try and figure out how I make my sprite face my mouse. So far the sprite moves to where my mouse is by some vector math.
Now I'd like it to rotate and face the mouse as ...
0
votes
0answers
68 views
Follow sinus with absolute value
I would like to make an arm follow the sinus of the ball. When I add an absolute value to the ball (on the y axis) to get a more realistic bounce, the ball is going 2 times faster.
How could I ask ...
1
vote
0answers
58 views
Rotate view matrix based on touch coordinates
I'm working on an Android game where I need to rotate the camera around the origin based on the user dragging their finger. My view matrix has initial position of sitting on the negative z and facing ...
8
votes
2answers
297 views
How do I simulate a swinging pendulum?
I want to simulate a rope with a weight attached, swinging back and forth like a pendulum. Any actual physics is overkill; it's just endlessly repeating the same motion.
JQuery has a the "swing" ease ...
1
vote
2answers
145 views
Rotations and Origins
I was hoping someone could explain to me, or help me understand, the math behind rotations and origins.
I'm working on a little top down space sim and I can rotate my ship just how I want it.
Now, ...
1
vote
0answers
65 views
Rotating around a bitmap
I can't figure this out, how do I make my bullets spawn where I want them to? :P
I want them to be shot out infront of my character-sprite(happy). But the rotation is all off and the bullet spawn ...
1
vote
0answers
68 views
Finetuning movement based on gradual rotation towards a target [duplicate]
I have an object which moves towards a target destination by gradually adjusting its facing while moving forwards. If the target destination is in a "blind spot", then the object is incapable of ...
2
votes
2answers
93 views
Finding the shorter turning direction towards a target
I'm trying to implement a type of movement where the object gradually faces the target. The problem I've run into is figuring out which turning direction is faster. The following code works until the ...
2
votes
1answer
276 views
Problem using glm::lookat
I am trying to rotate a sprite so it is always facing a 3D camera.
Object
GLfloat vertexData[] = {
// X Y Z U V
0.0f, 0.8f, 0.0f, 0.5f, 1.0f,
-0.8f,-0.8f, 0.0f, ...
0
votes
1answer
105 views
Rotate 2d sprite towards pointer
I'm using Crafty.js and am trying to point a sprite towards the mouse pointer.
I have a function for getting the degree between two points and I'm pretty sure it works mathematically (I have it under ...
1
vote
1answer
189 views
Rubik's cube array rotation
I'm about to make a 3D Rubik's cube based game in Flash AS3 and Away3d.
I don't really know how to manage the 2D arrays of the Rubik's cube.
For example, how do I rotate the corresponding arrays if ...