Scroll wheel
by USC - IMD student 2 · in Torque Game Builder · 10/27/2008 (4:28 pm) · 1 replies
Can I add scroll wheel functionality in TGB? How?
About the author
by USC - IMD student 2 · in Torque Game Builder · 10/27/2008 (4:28 pm) · 1 replies
Torque 3D Owner Kalle Wik
Default Studio Name
moveMap.bind(mouse, "zaxis", "onScrollWheel");
The function will be passed a parameter which represents the direction and amount of scroll applied:
function onScrollWheel(%x)
{
...
}
This number may be fairly large, and require scaling down appropriately. For instance, when using this to adjust a magnification factor for a window, we scale it by 0.0005.