Search Unity

Mathematics.quaternion - how do we multiply by double3?

Discussion in 'Entity Component System' started by Dreamback, Jun 17, 2020.

  1. Dreamback

    Dreamback

    Joined:
    Jul 29, 2016
    Posts:
    220
    I can't figure it out, I need to rotate a double3, similar to how in the old math system we would rotate a Vector3 by multiplying by a Quaternion. But there doesn't seem to be a way to do it. There isn't even a double3x3 or double4x4 with a quaternion constructor like there is with float3x3, for easy conversion to rotation matrices.

    This is for real world map simulation, where we need the precision of doubles when dealing with lat/long or utm.
     
    Last edited: Jun 17, 2020
    DrViJ likes this.
  2. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    Unfortunately there is no any plans for adding double quaternions to the Unity.Mathematics (and I don't understand why). So I had to copy-paste quaternion code and replace all floats to doubles. Which is very annoyng, but at least we have source code.
     
    DrViJ likes this.