|
Hi all,
I use maya 2009 and I have made a code that need to move a camera inside a callback (postRenderMsgCallback).
I would like to know how to tell a MfnCamera to translate itself by a given vector.
Anybody know how to do so ?
I tried this, but it doesn’t work…
MFnDagNode dagFn(_camera.dagPath().node())
MDagPath path;
stat = dagFn.getPath(path)
MFnTransform transformFn(path)
static int i = 0;
i++;
MVector v(i, 0, 0)
stat = transformFn.translateBy(v, MSpace::kWorld)
Thank you by advance.
|
|
|
|
You created a tranform object from the camera’s tranform, you updated it, but you didn’t apply it to the scene.
|
|
|