THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/06/2010 at 08:10, xxxxxxxx wrote:
Hey guys. You must not add hpb rotations just like so ;p
Its better generate a local rotation matrix and multiply it to the right of the tangent plane matrix.
Here is a piece of code which works pretty well in Ruis scene:
var m_spiral = new(Matrix);
m_spiral->SetRotHPB(vector(0,0,t*2*PI*10));
var hpb=VectorToHPB(tang);
var new_mat = new(Matrix);
new_mat->SetRotHPB(hpb);
new_mat->SetV0(pos);
new_mat=new_mat->GetMulM(m_spiral);
new_mat=spline1->GetMg()->GetMulM(new_mat);
var vec = vector(0.0,radii,0.0);
var new_vec = new_mat->GetMulP(vec);