Page 2 of 2

Re: Spring.UnitPieceTurnVec(UnitID, normedVecX, normedVecY,

Posted: 12 Dec 2014, 13:18
by PicassoCT
The idea was/is to avoid the whole vector to rad dance (with speed according to turn length) by getting a vector, and beeing able to turn a piece directly into that direction in one smooth movement.
+ Less Engine Calls
+Can use the output of most vector returning lua functions. (dont rememer if it has to be normalized)

Yeah, it will results in troubles as spring doesent use quaternions, which makes this basically three euler rotations.

https://www.youtube.com/watch?v=zc8b2Jo7mno

Re: Spring.UnitPieceTurnVec(UnitID, normedVecX, normedVecY,

Posted: 12 Dec 2014, 20:49
by 9heart
PicassoCT wrote:The idea was/is to avoid the whole vector to rad dance (with speed according to turn length) by getting a vector, and beeing able to turn a piece directly into that direction in one smooth movement.
+ Less Engine Calls
+Can use the output of most vector returning lua functions. (dont rememer if it has to be normalized)

Yeah, it will results in troubles as spring doesent use quaternions, which makes this basically three euler rotations.

https://www.youtube.com/watch?v=zc8b2Jo7mno
If you had two vectors (shoulder joint to current IK position (x1,x2,x3), joint to desired IK position (x2,y2,z2), you can calculate the rotation matrix between these two vectors with http://sourceforge.net/p/advants/kaena/ ... mVectors.h

Re: Spring.UnitPieceTurnVec(UnitID, normedVecX, normedVecY,

Posted: 12 Dec 2014, 22:01
by jK
ever thought of doing all rotations with quaternions in lua and then convert the results to Tayler-Brian angles used in spring?

Re: Spring.UnitPieceTurnVec(UnitID, normedVecX, normedVecY,

Posted: 12 Dec 2014, 23:24
by Super Mario
9heart wrote:
Super Mario wrote:
9heart wrote:You can build a rotation matrix to rotate about any arbitrary axis like this:

Image
How exactly did you derived that may I ask?
http://en.wikipedia.org/wiki/Linear_algebra
No, you smart ass, that not what I meant. What I mean is to show us your calculations, if you didn't calculate the equation and merely copy it, then tell us where, whom, name of it is.

Re: Spring.UnitPieceTurnVec(UnitID, normedVecX, normedVecY,

Posted: 12 Dec 2014, 23:38
by Peet
http://en.wikipedia.org/wiki/Rotation_m ... axis-angle

you probably could have found that in less time than it took to post and complain

Re: Spring.UnitPieceTurnVec(UnitID, normedVecX, normedVecY,

Posted: 12 Dec 2014, 23:43
by Super Mario
Peet wrote:http://en.wikipedia.org/wiki/Rotation_m ... axis-angle

you probably could have found that in less time than it took to post and complain
Or he could not be a smart ass,and just tell me the name of it, instead of posting a wiki link to linear algebra.