Similar method to Unity's Quaternion.FromToRotation?

Is there a method that gives similar results to Unity’s Quaternion.FromToRotation() in Flax Engine? So far I can’t find any.

Last time I checked, there wasn’t one. So here is an implementation. Feel free to just copy it, I’m hereby releasing those functions under CC0.

But more importantly, would you have a name suggestion for them? They are certainly useful enough to warrant being added into Flax.

1 Like

Thank you very much! Maybe VectorFromTo as a name?

Interesting. :smiley: How about being more specific and calling it

  • DirectionFromTo
  • FromDirections
  • FromToDirection

After all, one gives the function direction-vectors.

1 Like

That’s definitely a better idea. I liked FromToDirection the moment I saw it.

1 Like

Maybe they can get added in time for the Flax 1.3 release.