D
D
Dmitry Korolev2018-03-24 00:03:47
Unity
Dmitry Korolev, 2018-03-24 00:03:47

How to write if the quaternions are almost equal?

You need to write a condition that, if the quaternions are equal or almost equal, then do the action

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Daniil Basmanov, 2018-03-24
@adressmoeistranici

For example, you can calculate Quaternion.Angle and compare with some small value. Or take the distance between Quaternion.eulerAngles.

F
freeExec, 2018-03-24
@freeExec

And the quaternion has components {x, y, z, w}, so compare their proximity.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question