Spring.UnitPieceTurnVec(UnitID, normedVecX, normedVecY, norm - Page 2

Spring.UnitPieceTurnVec(UnitID, normedVecX, normedVecY, norm

Requests for features in the spring code.

Moderator: Moderators

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

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

Post 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
9heart
Posts: 55
Joined: 16 Sep 2010, 16:14

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

Post 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
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

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

Post by jK »

ever thought of doing all rotations with quaternions in lua and then convert the results to Tayler-Brian angles used in spring?
Super Mario
Posts: 823
Joined: 21 Oct 2008, 02:54

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

Post 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.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

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

Post 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
Super Mario
Posts: 823
Joined: 21 Oct 2008, 02:54

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

Post 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.
Post Reply

Return to “Feature Requests”