Mouse events in the game
by Tiago Correia · in Torque Game Engine · 05/17/2007 (4:42 am) · 3 replies
Hi,
I searched in the forums posts but i didn't find how to click with the mouse in a point and show me the positon of that point in the world or other events like select a house in the world with the mouse.
I know that i have to define a bind like moveMap.bind( mouse, button0, mousePosition ), but how can i define the function mousePosition to get what i want ? Or should i use mouse events like 'onMouseDown' or 'onMouseMove'?
Any help would be appreciated.
Regards,
Tiago
I searched in the forums posts but i didn't find how to click with the mouse in a point and show me the positon of that point in the world or other events like select a house in the world with the mouse.
I know that i have to define a bind like moveMap.bind( mouse, button0, mousePosition ), but how can i define the function mousePosition to get what i want ? Or should i use mouse events like 'onMouseDown' or 'onMouseMove'?
Any help would be appreciated.
Regards,
Tiago
Community Manager Michael Perry
ZombieShortbus
Particularly, look at the implementation of getMouse3DVec and getMouse3DPos.
The rest of the resource is actual selection of a 3D object using the mouse.