Game Development Community

Image nodes transformed in controlobject space

by Toks · in Torque Game Engine · 12/09/2007 (2:16 am) · 1 replies

Hey everyone,

It's probably not too hard to do but i cant really get it to work:
I need the node's in a weapons model transformed in objectspace of the control object. how is this done?

btw im trying to do this in the Player namespace.

thank anyone responding :)

#1
12/09/2007 (3:50 am)
I think i've got it, but probably not in the best way:

MatrixF mato, matt;
		mato = mMountedImageList[0].shapeInstance->mNodeTransforms[mMountedImageList[0].dataBlock->scopeNode];
		matt = mShapeInstance->mNodeTransforms[mDataBlock->mountPointNode[0]];

		Point3F pnt = mato.getPosition() + matt.getPosition();
		MatrixF eyeMat(true);
		eyeMat.setPosition(pnt);

next problem, how do i get this node's rotation?