TGEA 1.7.0 Beta 1 Bug - 3D coordinates issues
by Henry Garle · in Torque Game Engine Advanced · 03/21/2008 (5:43 pm) · 1 replies
I spent an hour or so today just messing with TGEA and decided to do a resource that i did on 1.1 without any troubles, just to see how it went. It was Mouse controlled player movement and everything works fine apart from now when i click on the screen, say bottom left it will go to the exact oposite point in top right. The ray casting seems to have a bit of an issue too, it only works when im inside the model of the target.
Code:
ConsoleMethod( GameTSCtrl, getMouse3DVec, const char*, 2, 2, "()")
{
char* retBuffer = Con::getReturnBuffer(256);
const Point3F &vec = object->getMouse3DVec();
dSprintf(retBuffer, 256, "%g %g %g", vec.x, vec.y, vec.z);
return retBuffer;
}
ConsoleMethod( GameTSCtrl, getMouse3DPos, const char*, 2, 2, "()")
{
char* retBuffer = Con::getReturnBuffer(256);
const Point3F &pos = object->getMouse3DPos();
dSprintf(retBuffer, 256, "%g %g %g", pos.x, pos.y, pos.z);
return retBuffer;
}
The co-ords seem to be reversed for some reason?
Henry
Code:
ConsoleMethod( GameTSCtrl, getMouse3DVec, const char*, 2, 2, "()")
{
char* retBuffer = Con::getReturnBuffer(256);
const Point3F &vec = object->getMouse3DVec();
dSprintf(retBuffer, 256, "%g %g %g", vec.x, vec.y, vec.z);
return retBuffer;
}
ConsoleMethod( GameTSCtrl, getMouse3DPos, const char*, 2, 2, "()")
{
char* retBuffer = Con::getReturnBuffer(256);
const Point3F &pos = object->getMouse3DPos();
dSprintf(retBuffer, 256, "%g %g %g", pos.x, pos.y, pos.z);
return retBuffer;
}
The co-ords seem to be reversed for some reason?
Henry
About the author
Torque 3D Owner Henry Garle
Ive used the "Object selection" and "Mouse controlled player movement" resources to make bots selectable and movable by clicking the mouse. In the picture below, i clicked roughly where the red circle is and the bot moves to the oposite.