THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/01/2007 at 13:19, xxxxxxxx wrote:
Cinema 4D Version: 9.6
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;
What code have I to write to obtain the entire value of the horizontal rotation of an object?
On 24/01/2007 at 14:23, xxxxxxxx wrote:
Can you be please a bit more specific? What kind of rotation do you need, global heading, pitch or bank, or x,y,z?
On 24/01/2007 at 14:55, xxxxxxxx wrote:
Ok! Really what I want to obtain is that on having rotated a called "Plane" object, the entire value of the horizontal rotation of this object assigns to itself to a variable to determine the file of a texture, for example: Tex0123.tif
var vObj, vRot;
if (vObj==NULL) return;
var fval = "0000" + tostring(vRot);
var mval = strmid( fval, sizeof(fval)-4,4);
var mfn = "F:\\ExemplesXPresso\\Textura\\Arboles\\Tex" + mval + ".tif";
var mat = doc->GetFirstMaterial();
// Sets a texture for it
var color = mat->GetChannel(CHANNEL_COLOR);
var colorC = color->GetContainer();
On 24/01/2007 at 15:34, xxxxxxxx wrote:
In short, which I am interested in knowing is the rotation: global heading of object
On 25/01/2007 at 04:43, xxxxxxxx wrote:
this will give you the global rotation of an object.
var glrot = op->GetMg()->GetHPB();
glrot.x is the heading
glrot.y is the pitching
glrot.z is the banking
On 25/01/2007 at 11:07, xxxxxxxx wrote:
Thank you Matthias is exactly this what I want to know.