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.

learn more… | top users | synonyms

2
votes
1answer
141 views

Unity - Quaternion - Rotate / Unrotate Error

I'm trying to unrotate a quaternion, aligning it with the axis, and then rotate it back to where it was originally. But with every iteration it seems to lose precision and just after 20 iterations the ...
1
vote
1answer
42 views

Clamping quaternion rotation

Currently I have an orbiting camera that fixates on a single point. In the node-based structure, _cameraNode is a child of _cameraTargetNode. I am able to orbit around the target node via the ...
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 ...
-5
votes
1answer
636 views

How can I create a WebGL camera based on quaternions?

I am trying to create a WebGL camera based on quaternions. I looked at many tutorials, and none is as simple as it could be or it was not working. How can I create such a camera?
2
votes
0answers
133 views

Quaternion - rotating rigidBody to particular angle over time

Using Bullet Physics. There's a rigid body that is rotated. For some delta-time I need to rotate that body to have rotation of (0, y, 0) - keep the old y value rotation but reset x and z. The ...
2
votes
0answers
299 views

Quaternion to direction vector - flipping

I've kinda solved this myself by adapting the Camera::setDirection code from OGRE to work for my need: Now I have the following code: Vector3 boneDir = getBoneWorldOrientation(mEntity, mHips) * ...
1
vote
0answers
159 views

How to set object's / node's absolute rotation correctly?

Usually when I want to rotate an object/node in my Ogre scene I call the node's rotate() method. That rotates the node locally relative to it's current rotation. So for example, when I start with 0 ...
0
votes
0answers
52 views

XNA C# - Get original rotation from parent bone transform

I have a 3DS Max made model, exported into FBX and imported into XNA project. The parts I am working with have NOT been rotated in Max (specifically, collision mesh is made of Axiz-Aligned boxes). ...
0
votes
0answers
138 views

Camera Rolling when Implementing Pitch and Yaw

I am implementing a camera in opengl for an android game and am having problems getting the pitch/yaw/roll of the camera correct. I have read many tutorials on quaternions and have implemented a basic ...
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
95 views

JBullet quaternion to Euler angle conversion causes strange flipping behavior

I am making a game using JBullet (a Java port of C++'s Bullet library) for the physics and LWJGL for the graphics. However, JBullet measures angles in quaternions and LWJGL uses Euler or ...
0
votes
0answers
89 views

rotating sprite with quaternion in scenegraph

I have been trying to set up a scenegraph in XNA, which I then use to draw sprites in the correct places. It uses matrix transformations to accomplish this. So far, I got position and scale working ...
0
votes
0answers
98 views

GLM Rotating Combining Multiple Quaternions?

I have a camera which I want to control with my mouse. I want the mouse to control the pitch and yaw of the camera but not the roll. To avoid loss of significance, I am storing the quaternions for ...
0
votes
0answers
53 views

How to move objects flat on different planes in 3d?

I need to move objects in circular/square/sinusoidal patterns in a flat manner on a collection of different and rotating planes in 3d space. I have the perpendicular of the planes. One method is to ...