Rotation object/image that is in mount
by KLEBER SEIXAS · in General Discussion · 06/18/2007 (2:42 pm) · 1 replies
I am wanting to turn an object/image that this in one mount. how I make this?
About the author
by KLEBER SEIXAS · in General Discussion · 06/18/2007 (2:42 pm) · 1 replies
Torque Owner Bryce
Tactical AI Kit
function turnImage(%this,%slot,%xrot,%yrot,%zrot) { %image = %plr.getMountedImage(%slot); // Its mounted to slot zero, right? %trans = %image.getTransform(); %pos = getWords(%trans,0,2); // Its xyz position in the world %rot = getWords(%trans,3,5); // Its xyz rotation in the world %newRot = %xrot SPC %yrot SPC %zrot; %newTrans = %pos SPC %newRot SPC "0"; %image.setTransform(%newTrans); // Apply the transformation }Arguments:%slot: What image slot the image is mounted to on the player
%xRot: the number of degrees to rotate on the x axis
%yRot: the number of degrees to rotate on the y axis
%zRot: the number of degrees to rotate on the z axis
Example: