Mathematical constructions, number systems. In 3D-graphics quaternions are used alongside vectors and matrices. One of the benefits of quaternions is that they overcome some rotational problems (known as gimbal locks) that are inherent to vectors and matrices.
1
vote
0answers
21 views
Convert rotation from Right handed System to left handed
I have Euler angles from a right handed system that I am trying to convert to a left handed system. All the information that I have read online says that to convert it simply multiply the axis and ...
2
votes
2answers
94 views
Rotating a child shape relative to its parent's orientation
When rotating a shape using a quaternion value I also wish rotate its child shape.
The parent and child shapes both start with different orientations but their relative orientations should always be ...
0
votes
1answer
71 views
(Quaternion based) Trouble moving foward based on model rotation
Using quaternions, I'm having trouble moving my model in its facing direction. Currently the model moves can move in all cardinal directions with no problems. The problem comes when I rotate the move ...
2
votes
2answers
118 views
Rotate model using quaternion
Currently I have this to rotate my 3D model that rotates on it's local axis independent from the world's axis:
// Rotate model with Right Thumbstick
modelRotation -= pController.ThumbSticks.Right.X * ...
3
votes
1answer
86 views
D3DXMatrixDecompose gives different quaternion than D3DXQuaternionRotationMatrix
In trying to solve this problem, I tracked down the problem to the conversion of the rotation matrix to quaternion. In particular, consider the following matrix:
-0.02099178 0.9997436 -0.008475631 0
...
3
votes
2answers
120 views
How to derive euler angles from matrix or quaternion?
Currently working on steering behavior for my AI and just hit a little mathematical bump.
I'm in the process of writing an align function, which basically tries to match the agent's orientation with ...
3
votes
2answers
92 views
Rotating voxels in 3d space amongst the x axis
I have a very simple voxel engine and so far it works based on coordinates, e.g. x, y, z. I was wondering if there is a formula for rotating groups of voxels/coordinates from the x axis(e.g. [0, 1, ...
1
vote
2answers
194 views
Rotation matrix derived from quaternion is opposite of expected direction
When I calculate a rotation matrix from a quaternion, it seems to be in the opposite direction. For instance:
For a rotation of +45 degrees about the Y-axis, I would expect to get the following ...
1
vote
3answers
123 views
Inverting matrix then decomposing gives different quaternion than decomposing then inverting the quat
I'm getting different signs when I convert a matrix to quaternion and invert that, versus when I invert a matrix and then get the quaternion from it:
Quaternion a = Quaternion.Invert(getRotation(m));
...
2
votes
2answers
180 views
Quaternions - how to limit axis?
Is there any possibility to limit quaternions to move only in x & y axis (like in Eulers- yaw and pitch, without rolling)? I's there any equation or something similar to do this?
Some example:
...
1
vote
1answer
148 views
Finding a suitable axis-angle to avoid gimbal lock
In OpenGL the camera faces the -z axis with the +y axis pointing up. I am using quaternions to represent the orientation of my objects (which works well) and am trying to do the same for the camera. I ...
0
votes
1answer
121 views
Rotation matrices from Quaternion.Identity and -Quaternion.Identity are the same?
If I create a rotation matrix from an identity quaternion then it is the same as a creating it from a negative identity quaternion
Matrix m0 = ...
1
vote
3answers
318 views
How to keep my Quaternion-using FPS camera from tilting and messing up?
I am using an FPS-like camera, and it uses quaternions. But, whenever I try looking up and then sideways, it tilts, and sometimes it can turn upside down. How can I fix this?
2
votes
1answer
334 views
Quaternion Camera Orbiting around a Sphere
Background: I'm trying to create a game where the camera is always rotating around a single sphere. I'm using the DirectX D3DX math functions in C++ on Windows.
The Problem: I cannot get both the ...
1
vote
0answers
117 views
Smooth Camera Offsets
I am attempting to implement a sort of, smooth camera that has angle offsets from the player as they turn, creating a cinematic effect as well as visual feedback for when the player turns.
Here is an ...