1,510 questions
0
votes
1
answer
156
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 ...
6
votes
1
answer
295
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
0
answers
44
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
109
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
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
1
answer
116
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
348
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 ...
1
vote
1
answer
99
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 ...
0
votes
1
answer
251
views
ECI/body frame quaternion confusion
I have just started trying to wrap my head around the basics of using quaternions in my rocket simulation to handle guidance maneuvers. In my sim, I keep an ECI-to-body quaternion transform updated at ...
-3
votes
2
answers
209
views
Rotation of a cube in a 3d space in unity
i like to rotate a cube on the vertical as well as the horizontal axis.
For this I have 4 inputs. Rotate left/right and up/down. The input ranges from -180 to 180 degrees on each axis.
I have tried ...
0
votes
0
answers
55
views
C# SharpDX, Quaternion Squad not continue
I'm using SharpDX to perform Squad interpolation of quaternions, but the calculated results are not continuous. Here is the code. What is the issue, and how can I fix it?
The following graph ...
1
vote
0
answers
42
views
Setting joint hierarchy rotations to a new bind pose with quaterions
Edit: Adding a more concrete example and some images.
Normally you can take the HIERARCHY section of a BVH file, plot the joints with their positions relative their parents and display the bind pose (...
0
votes
1
answer
49
views
Rotate a 3D Vector around Axis and degrees
I try to rotate a Vector (0,0,-1) around an axis (Y) (0,1,0) with specific degrees (90°) using the System.Numerics Libary from .NET
My Problem is that i get a wrong output and i dont get the Problem.
...
-1
votes
1
answer
34
views
Why isn't my code which is supposed to target and turn towards player not working? I filled in all variables btw
my problem is that it knows to turn because I added a debug.log statement but it still will not turn even though I have the quaternion.RotateTowards function.
At first I tried to replace the ...
2
votes
2
answers
141
views
In Unity, why does a roll of 360 degree represented in Quaternion have a different value?
Quaternion in Unity has been quite reliable despite some quirks in terminology (e.g. being in a reference frame that is both left-handed and right-handed), and for many months I've taken it for ...
0
votes
1
answer
247
views
Why does the conversion from rotation matrix to quaternion and vice-versa does not work for some matrices?
I am struggling with the conversion between some rotation matrices and vice-versa in Python and I can't seem to get what's wrong with those not working.
There are some other posts, detailing that ...
0
votes
0
answers
46
views
Find difference in Rotation about a specific sequence of rotation
I have two Quaternion rotations
Quaternion rotation1 = Quaternion.LookRotation(forwardVector1, upVector1);
Quaternion rotation2 = Quaternion.LookRotation(forwardVector2, upVector2);
I want to ...
1
vote
2
answers
490
views
Is it possible for a quaternion to represent a rotation pass 180 degree?
I am wondering if quaternions can be used to represent a rotation that is beyond 180 but below 360 degrees?
I am asking this in the context of Unreal Engine's FQuat library where my combined ...
0
votes
0
answers
76
views
Quaternion-based State Estimation giving wrong values when pitch approaches 90 degrees (STM32 project in C)
I had a problem concerning state estimation with quaternions, specifically with the practical application with an actual IMU. In my simulation in Matlab, my state estimation model worked fine (I used ...
0
votes
1
answer
44
views
Find semi-equivalent Euler rotation vectors with one axis zeroed out
I’ve been stumped by a 3d math problem that exploits my weakness in quaternions! I am visualizing data from a physical sensor in unity / c#.
I have a ‘rod’ object with a rotation represented by the ...
2
votes
1
answer
220
views
How do you represent quaternion rotations in 2 dimensions?
I'm developing in Android Studio Java with two Bluetooth IMUs that give quaternions. The sensors are oriented in the following way to start:
In the image shown, this is considered the “zero” position....
-1
votes
1
answer
365
views
glm::yaw How to get range between -180 to 180 or 360 degrees
I have a quaternion and I rotate this quaternion around the y axis.
I try to get the yaw from this quaternion and convert to degrees and it works perfectly fine... Until it gets past 90.
After it gets ...
-1
votes
1
answer
290
views
Switching Coordinate Frame for Quaternions
I'm given quaternion data of an object [w, x, y, z] in the Forward Left Up (FLU) coordinate system and I would like to convert it to quaternion data in the Forward Right Down (FRD) coordinate system. ...
0
votes
1
answer
33
views
Assets\Pinegenegrator.cs(26,80): error CS1503: Argument 4: cannot convert from 'UnityEngine.Quaternion' to 'UnityEngine.Transform'
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Pinegenegrator : MonoBehaviour
{
public GameObject pinePB;
private float cd;
public float ...
-1
votes
1
answer
97
views
In Rust, what may cause the numerical error of UnitQuaternion multiplications in succession? How to avoid it?
Assuming that the following function get_correction is defined such that given the first rotation, it can compute the 2nd consecutive rotation that can rotate a 3d vector to the "UP" ...