Game Development Community

T3D 1.1/1.2 getPosition inconsistency

by Daniel Buckmaster · in Torque 3D Professional · 01/20/2012 (12:48 pm) · 0 replies

At the moment, this is in sceneObject.cpp:
DefineEngineMethod( SceneObject, getPosition, Point3F, (),,
   "Get the object's world position.\n"
   "@return the current world position of the objectn" )
{
   return object->getTransform().getPosition();
}
This is a bit annoying. I was trying to debug a getPosition problem with a custom class, and it took me quite a while to figure out that the console method getPosition doesn't actually call getPosition. Not technically a bug, but an inconsistency that makes it that bit more difficult to find bugs.

Although it did help me find a bug in my getTransform() method... which shouldn't have happened in any case, if it weren't for Visual Studio's brilliant debug-mode-bug-hiding tactics. Am I wrong to assert that VS actually hides bugs from you in debug mode, only to let them bite you in Release mode... where you can't step through the code to see what's going wrong? Ugh.

About the author

Studying mechatronic engineering and computer science at the University of Sydney. Game development is probably my most time-consuming hobby!