Game Development Community

Bug in setMousePosition()

by Ken Pajala · in Torque Game Builder · 02/10/2008 (7:59 pm) · 0 replies

It just doesn't update the current camera view before working it's magic...

In t2dSceneWindow.cc add these two lines to the beginning of the function setMousePosition():
// Set World Mouse Position.
void t2dSceneWindow::setMousePosition( const t2dVector& mousePosition )
{
   // Calculate Current Camera View.         // <-- insert
   calculateCameraView( &mCameraCurrent );   // <-- insert

   // Fetch Canvas.
    GuiCanvas* pCanvas = getRoot();
...

Note that this makes it match getMousePosition().