Game Development Community

Mouse Distance from Screen Center?

by CdnGater · in Torque Game Engine Advanced · 04/13/2007 (1:42 pm) · 1 replies

I am wondering if there is a built in way to determine how far the mouse pointer is away from the center of the game window?

As far as I can see, the mouse values are delta's from their old position.

If there is no build it way, what would someone suggest?

Thanks

#1
04/13/2007 (2:26 pm)
Oh, I think I just figured it out. Canvas has getCursorPos(). So I can use that, and subtract the Canvas Center giving me deltas from the center. The rest is easy now.

Sometimes I could just kick myself.