Game Development Community

Con::printf giving me crazy #'s

by Dracola · in Torque Game Engine · 03/10/2006 (6:39 pm) · 3 replies

I am trying to convert the mHead rotation in player.cc into a number between 1 and 0 but to do this I need to know the maximum number it can be. I believe it is in radions but the Con::printf I created to test this is returning crazy numbers. ex.

-2147483648 -1075460927 0

I don't know what that means. Heres my code.
Con::printf("%d %d %d", mHead.x, mHead.y, mHead.z);
Is there anything I'm missing should I be converting this to something else? And if so how, i'm pretty new to this.

#1
03/10/2006 (7:33 pm)
Should be using %f instead. The values are in floating point but %d expects them to be integer.
#2
03/10/2006 (7:52 pm)
Thanks I'm actually having some trouble compiling right now but once that gets sorted out I'll see how it works.
#3
03/10/2006 (8:25 pm)
... edit solved should be using mrot, it worked thanks Tim.