1,510 questions
0
votes
1
answer
166
views
Intermediate between two quaternions
In the below code snippets, vec4 is simply an alias for std::array<float, 4> where index 0 is x, 1 is y, 2 is z, and 3 is w.
I want to find an intermediate q3 such that q3 = q1 + (q2 - q1)*ratio ...
1
vote
0
answers
63
views
Euler angles continuity ZYX (Yaw Pitch Roll) when pitch crosses ±90
I’m using a Force Dimension Omega.7. From its 3×3 rotation matrix
𝑅
, I extract ZYX Euler angles (Yaw–Pitch–Roll) as:
double yaw= std::atan2(R\[1\]\[0\], R\[0\]\[0\]); // Z
double pitch = std::...
6
votes
1
answer
299
views
System.Text.Json is not handling Quaternions - is there some Json settings we need to set/support?
We are having some issues deserialising classes with Quaternion properties.
We are seeing very odd behaviour.
The Quaternions deserialise correctly (we can do a custom JsonConverter to confirm the ...
0
votes
2
answers
248
views
How to rotate one vector around another by a certain angle using struct and quaternion in C language?
I am solving this problem-
U and K are vectors is R3. U rotated around K by an angle θ in radian produces a new vector V. Find the components of V as functions of U , K and θ.
I solved the problem ...
0
votes
0
answers
51
views
Mapping Phone Quaternion Data to Vulkan Coordinates and having Consistent Rotation Behavior
I'm working on a Vulkan project that takes my phone Quaternion data through a UDP connection, and then is used to transform the coordinates of a sword. However, the model doesn't accurately represent ...
0
votes
1
answer
64
views
Raycast only collides with terrain, it gives a position directly infront of my ingame vehicle if I look at anything that's not terrain. (unity)
My original problem was that the raycast system I was using to get my turret to aim at where my camera was pointing failed to function when aiming at enemies or the sky, it would aim at the ground ...
0
votes
1
answer
111
views
DirectX. Quaternion to left-handed 3x3 matrix
I am using X-files to store 3D models. I want to take rotation from X-file. In X-file rotation is represented by quaternion. I am using DirectX 11 and left-handed coordinate system. I want to create ...
0
votes
1
answer
94
views
Quaternion Rotation mirrors or flips sometimes C#
I did implement my own class in c# of quaternions to understand how 3D objects are displayed on computer screens. That worked really well, but if i try to rotate all the points of an object above 90 ...
0
votes
0
answers
52
views
Smartphone attitude rotation from reference frame, airplane like
I am working on a mobile application using magnetometer, gyroscope and accelerometer to get information about device attitude as yaw, pitch and roll.
I am using Expo which has a DeviceMotion API ...
0
votes
0
answers
31
views
Print rotation angles when rotating with TransformControls in R3F
I’m trying out R3F in React and rotating a capsule model using TransformControls (only on the Z-axis). I want to print the current rotation angle whenever it changes, but only the initial angle gets ...
0
votes
1
answer
125
views
DirectX quaternion camera - rolling when changing pitch and yaw
Ok so, I'm currently making my own little engine using DirectX11. I got a lot of things working and decided to go back to my Transform class to make it a bit more polished. I changed my rotation from ...
1
vote
1
answer
86
views
Disagreement between SciPy quaternion and Wolfram
I'm calculating rotation quaternions from Euler angles in Python using SciPy and trying to validate against an external source (Wolfram Alpha).
This Scipy code gives me one answer:
from scipy.spatial....
1
vote
1
answer
364
views
Convert glm::quat to glm::vec3 of Euler angles? [duplicate]
How to convert glm::quat data to glm::vec3 angles?
Example:
I've start data:
glm::vec3 start = glm::vec3(90, 30, 45);
and after convert to quat
(0,730946)(0,016590)(0,677650)
.... How to convert ...
0
votes
0
answers
58
views
Why are OMPL quaternions almost 0?
I'm working with OMPL trying a version of this demo but changing it to 3 dimensions and using it for ROS2 (That last part about ROS2 is not relevant). Of course, I need the quaternion to make the ...
1
vote
1
answer
107
views
Using Quaternions in Jacobian IK
I'm working on an Inverse Kinematic system using Jacobian, but I am struggling with creating a Jacobian matirx populated by partial derivatives for/with quaternions. At the moment I am using Euler ...