Armory: Slerp quaternions

Created on 4 Nov 2020  路  3Comments  路  Source: armory3d/armory

A function to interpolate rotations would be amazing, unfortunately there is not too much stuff about it in the internet and looking in https://en.wikipedia.org/wiki/Slerp i don't get nothing in mind.

========================

In the blend file trackto.zip, i try to lock the Suzanne coordinates in a circular way around the cone to make it don't turn back immediately, but even using a curve, it does not work (except for the mesh).

This probably also have problems because the nearest angle to interpolate. I said about this because we would take advantage of Mix Vector and Look At to interpolate the rotations if there is some way to put the "linear" coordinates in a circular field (just putting the result of Mix Vector in another coordinate around the 0, 0, 0 coords based in the distance between the point A and B.

feature request

Most helpful comment

I wonder what this Kha function can do what with one single quat?

Why alone?
The dot() (line 32) and scaled() functions (line 45 and line 48) are executed by an instance of the class and use the data of that instance (i.e. one of the quaternions specified by the current quaterion).
In Iron, the lerp() function is executed only on the passed data, it does not use the current quaternion.

All 3 comments

Using the Mix Vector to interpolate rotations does not consider things like nearest angle and can't be "locked" in one axis (even if the two rotations are in the same axis, the rotation between the two given rotations will turn around all axis).

I have no idea about what this function does. In iron/math/Quat.hx there is a lerp function that requires from: Quat, to: Quat, s: FastFloat. I wonder what this Kha function can do what with one single quat? I will test it sometime to find out, thanks!

I wonder what this Kha function can do what with one single quat?

Why alone?
The dot() (line 32) and scaled() functions (line 45 and line 48) are executed by an instance of the class and use the data of that instance (i.e. one of the quaternions specified by the current quaterion).
In Iron, the lerp() function is executed only on the passed data, it does not use the current quaternion.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DevMagicLord picture DevMagicLord  路  3Comments

greyheron picture greyheron  路  4Comments

BrahRah picture BrahRah  路  3Comments

Amir-Arsalan picture Amir-Arsalan  路  4Comments

e1e5en-gd picture e1e5en-gd  路  3Comments