Game Development Community

What am I seeing here?

by Nathan Huffman · in Torque Game Builder · 01/02/2007 (4:14 pm) · 3 replies

I have a 3d object, it's rotation is X 0 Y -90 Z 0.

The 3d object is $pguy.

I try echo($pguy.getShapeRotation());

...and the result is:

0.0 0.0 -1.57

What is this? I'd think it'd give me "0 -90 0", no?


edit: also getting results I don't understand from t2danglebetween, i'd expect an angle (0 to 360 or if it uses negatives) based on the two angles fed to it, but all I get is a larger number the further I click away from the location of the first parameter...

#1
01/02/2007 (6:15 pm)
-1.57 radians = -90 degrees
#2
01/03/2007 (3:51 am)
Hmm, the documentation I read said it would be returned in degrees.

I also thought it would return X, Y, Z... but it looks like Y is last.

hmm, thanks :)
#3
01/13/2007 (2:11 am)
Here :

Quote:mRadToDeg(%radians)

Purpose
Converts an angle in radians to degrees.

Syntax
%radians - Float
The angle in radians to be converted.

Return Value - Float
The angle in degrees.

^^