When I gave a gizmo to my parent object, I saw that the gizmo wasn't in the center of my parent object. So the character is turning, but instead of rotating on its own axis, it rotates around the gizmo.
I simply moved all the children to the center of my parent object (right in the middle of the gizmo) and the problem was solved.
Sort of in response to Soonts answer, but also for other people that may wonder, like I did, I found that the formula does work after an implementation in Unity, C#. I am sorry if "reviving" this is considered bad input.
Inputting W = [0, 0, Pi/2, 0] ([x, y, z, w] format) and letting t be the delta time between screen refreshes (Time.deltaTime), ...
Have you tried Rigidbody2D.MoveRotation ?
Example (press any key to rotate the object to 10 degrees):
public class Rotate : MonoBehaviour
private float _angleVelocity = 10f;
private Rigidbody2D _rigidbody;
private bool _rotate;
private void Awake()
_rigidbody = GetComponent<...
This line extracts just 2 imaginary components out of a 4-dimensional quaternion:
Vector3 rotation = new Vector3(
In general, it is not safe to extract individual components of ...
Okay, I guess I found a workaround.
Thinking about what I did I realised that the problem occures because I add the rotation of the "parent" to the "child" when I start the calculations in the while loop. So after calculating the offset position, which is a direction pointing towards the child, I have to rotate this direction inversed by ...