Questions tagged [quaternion]
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.
394 questions
1
vote
1
answer
169
views
Understanding the math behind procedural aiming animation
I'm creating a procedural aiming animation system in UE5 as a learning experiment.
In order to position the hand for aiming down sights, I'm using a forward vector from player camera to project out a ...
0
votes
1
answer
129
views
How to Rotate a Sphere around a Tilted Axis in a 3D space
I'm developing a game with Unreal Engine 5.4.4.
In the game, I'm trying to rotate a sphere around its Z axis. If I put the sphere on the map and add a rotation around its Z axis is easy.
I only have ...
2
votes
0
answers
84
views
How to convert a quaternion to another coordinate system where y and z are inverted?
I have quaternion representing a camera pose in a coordinate space called "World Frame 2":
x+ = right
y+ = up
z+ = out
...and I want to convert it to another space called "World Frame ...
2
votes
1
answer
404
views
Interpolation over a sequence of quaternions
I am trying to interpolate over a sequence of rotations represented by quaternions.
I am currently employing Squad (Spherical and Quadrangle Interpolation). I successfully applied the function to 4 ...
0
votes
1
answer
183
views
Rotate vector by quaternion different formulas
I was implementing the rotation of a 3D vector by a quaternion, implementing the formula that I've found in this thread.
To testing my function, I've rotated some vectors by using MATLAB, in ...
1
vote
0
answers
86
views
Quaternion.Euler acting weird
so I'm building up a simple arcade racing game and I was messing around with the Wheel Colliders setup. I was wondering if it was possible to add some camber adjustments in real time depending on the ...
0
votes
1
answer
170
views
Comparison of 2 different quaternion axes
I am trying to compare the Z-axis and the X-axis of two different quaternions in a way that would give me the Euler angles about the X and Y axes to line up the two different axes. In my program, the ...
0
votes
2
answers
751
views
Why are Quaternions better than Euler-Angles for Godot (when to use which)?
Sorry about the click-bait, I know there are many many reasons why Quaternions and Bases are better than using Euler-Angles. Anyone on a 5 second google search could easily know why!
But I am trying ...
0
votes
2
answers
180
views
How to rotate spaceship quaternion to face target direction with constant angular speed?
I have an enemy spaceship, and I want to make it turn to face the player with (for now) a constant angular speed. The ship's orientation is a quaternion. How do I do this?
Since this is totally free ...
0
votes
1
answer
282
views
How to get difference in rotation between 2 objects, but only on one axis
Say I have 2 cubes that start with the same rotation. I wish to track the rotation difference between the 2 about the z (forward) axis. Such that if cube A remains stationary and cube B rotates 30 ...
0
votes
1
answer
73
views
Usage of 'World rotation quaternion'?
While debugging the code that decomposes the world matrix, I found that the decomposed world rotation value is different from the world rotation value stored in Transform.
Simply, World Rotation is ...
0
votes
0
answers
445
views
Correct order on accumulating rotations
Suppose I have an Arcball camera that rotates up/down and sideways based on mouse input. After doing some research, I discovered that the correct way of calculating the new orientation is to do it the ...
0
votes
2
answers
146
views
Quarternion rotation flattening cube
I am trying to rotate a cube using a quaternion matrix with WGPU. However, whenever I try to rotate it, I end up with
I am using the matrix from https://en.wikipedia.org/wiki/...
0
votes
1
answer
171
views
Smartphone tilt calculation when using gyroscope in Unity (smartphone moving problem)
I have been trying for several days now to set up the correct behavior of the gyroscope in Unity. I want to make it so that when the smartphone is tilted, the object tilts along the z-axis. I found ...
0
votes
1
answer
83
views
Orient a player mid-air to their predicted landing orientation in Unity?
Ever played Skate 3? When dropping into a ramp, or if you're midair, your player's up direction aligns to the normal of the surface you're about to land on, while respecting the player's forward ...