Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 11-19-2005, 04:07 PM   #1
Solid State Member
Join Date: Aug 2005
Posts: 6
Default setTransform() errors

I am working in the Torque engine and running into some problems with the setting the transformation of objects. Here is my function that is giving me errors:

[the origonal transform is set to ("-90 -2 11 0 0 1 0")]

function Turn(%heart,%rx,%ry,%rz,%angle)
%var = %heart.getTransform();
%x = getword(%var,0);
%y = getword(%var,1);
%z = getword(%var,2);

%heart.setTransform(%x SPC %y SPC %z SPC %rx SPC %ry SPC %rz SPC %angle);

//the above setTransform is the one I would like to use, the two below are
//just testing what happens when I try a differant approach

%heart.setTransform("-90 -2 11 0 0 1 20");

%heart.setTransform("-90 -2 11 "@ %rx SPC %ry SPC %rz @" 30");


The object's handle number is set to $t.
I run the function as Turn($t,0,0,0,30)
And the results of the echo's are:

-90 -2 11 1 0 0 0 (why is the x rotation one and the z rotation 0? And why isn't the final value 20?)
-90 -2 11 0 0 1 1.15 (why 1.15 and not 20?)
-90 -2 11 1 0 0 0 (again, x and z should be switched. Also, the final value should be 20)

I have no idea what in shiva's name is going on- can someone help?
bobfritzelpuff is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 01:03 AM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0