Game Development Community

Newbie Q: Clicking on objects?

by Howard Liu · in Torque Game Engine · 09/18/2001 (10:19 am) · 2 replies

Is it possible, from the script, to allow players to click on objects (i.e., 3D objects in the game world, not buttons in the GUI)?

For that matter, how do you enable a player's mouse? I created and enabled a new GUI screen, but there was no mouse cursor available. I think I tried enableMouse(), enableMouseControl() or something like that, but couldn't figure it out (seems like a client side command anyways).

Thanks in advance for any help.

#1
09/18/2001 (11:29 pm)
About the mouse thing: You dont need to enable the mouse... just remove the command that disables it =oP

Cant remember exactly.... but its on the scripts of the example app...

about clicking objects... you mean clicking and selecting them? as in the world editor? I also wanna to that... no luck on a quick solution till now.

hope it helped...
#2
09/19/2001 (2:20 am)
The script functions cursorOn() and cursorOff() will show/hide the cursor. It is possible to use the mouse cursor to select 3D objects in the scene - the World Editor does just this. I would start by cruising through the script code for the World Editor under example/base/editor.