Game Development Community

Right click when toggling cursor

by Mehmet Kizil · in Torque Game Engine · 09/26/2005 (9:35 pm) · 1 replies

I have this very simple toggle cursor function attached to my "m" key.

// Setting up a toggle mouse button
function toggleMouseLook(%val)
{
   if(%val)
   {
      if(Canvas.isCursorOn())
         CursorOff();
      else
         CursorOn();
   }
}

What I would like to do is when the cursor is on, have the right key act like it does in the mission editor. As in, when the cursor is on, I can move left and right, forward and back, but I cannot change the view as in up and down. How do I implement this?

#1
10/02/2005 (10:46 pm)
Have you checked to see what happens in the right-click case?