Notifications
Clear all
[Closed] SDK Set Node Direction
Feb 05, 2016 11:19 am
Hi, I’m looking for a C++ version for the Node.dir in maxscript. I’ve looked in the samples and just can’t find anything. Any help ??
4 Replies
Feb 05, 2016 11:19 am
Is it not the same than the third component of the transform matrix? ($.transform.row3)
Feb 05, 2016 11:19 am
Unfortunately not, as the node.dir seems to effect all the first 3 rows off the matrix. I just can’t figure out what its doing though As there doesn’t seem to be anything in the SDK that can set node.dir
Feb 05, 2016 11:19 am
here is equivalent of applying a dir:
fn setNodeDir node dir =
(
dtm = arbaxis (normalize dir)
itm = node.transform
ftm = translate (rotate (scalematrix itm.scale) dtm.rotation) itm.pos
node.transform = ftm
)
node.dir = dir
-- is the same as
setNodeDir node dir
i hope that will not be a problem to convert it to c++