im starting to forray into some vector and matrix stuff, and finding it quite daunting, and i was playing around with the vector product node. basically im looking to compare the orientation of a control to the world so i can base aim vecors on and other such decisions in my scripts. and im not sure if im plugging in the correct values.
can i just plug in the rotation for this? or is it a matrix calculation thing? if so what matrix, theres so many!! or is there a better way to find out what local axis of an object matches the world z axis? i was looking at using xform -q -ws- rotation but that seems a bit messy (and i suppose im a bit lazy )
QUOTE(andylt1 @ 03/12/08, 02:25 PM) [snapback]282490[/snapback] can i just plug in the rotation for this?
Sure, but rotation isn't a vector, so theres no sane result. However what you do is you take out the vector of the axis in local sapce you may want to use adn vector multiply it with the world matrix (you are afeter the world space transformation). Or just connect the firt row of the matrix in as your vector if you dont want slanted vectors.
QUOTE if so what matrix, theres so many!!
yes theres one matrix for each trasform in the scene, plus the cached inverse of thet matrix, world compound, and inverse world. Depending on what space you would like to use. (inverses are there so you can traverse the info in reverse order)
this is kinda makin sense. but im still a bit unsure on what to plug in where. i tried to plug in the world matrix of the control (or a locator as a quick test) to the matrix of a VP node and tried some different settings but to be honest at the moment i dont think id know the correct result if i produced it! :S
i think im guna have to bury my head in some books to get this. if its no too cheecky is there any chance of a quick explanation on what setting an attritbutes to use.
joojaa you are indeed a gentleman and a scholar thats awesome thanks for the help. only had time to give it quick look late last night but, it intanlty made more sense, i will give it a good digging through today.