quat= fn quatFromVectors vForward vUp -- nevermind, I figured it out

/*
x-axis should point to vForward, y-axis should point to vUp.
I got z to point at vUp using .dir, but I'm clueless as to getting the angle with which to swing the x-axis round the z-axis to vForward. I suspect matrix3 is the way to go, but that's beyond me.

It's for an importer, for vehicle physics, for halo custom edition. It would be out of your generosity, but it'd make some peoples happy to better understand how halo's vehicles work, so they can make their own custom creations work better.
You'll be in the about dialog ;)
*/

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
bobbysoon's picture

solved

fn vecRot o mpForward mpUp =
(
mpPos= o.transform.row4
mpSideways= cross mpForward mpUp
m= matrix3 mpForward mpSideways mpUp mpPos
o.transform=m
)

That's what I came up with

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.