Game Development Community


#1
01/17/2007 (10:37 am)
I'm also interested in having objects respond to mouse events... in TGB, this was pretty straightforward, but I don't see any mouse documentation in TorqueX.

Anyone...?
#2
01/17/2007 (11:10 am)
Which specific events are you looking for? Currently you can bind mouse movements as well as clicks and scrollwheel through the TXE input system, but if you want to have mouse events for controls themselves, you'll have to roll your own (like an onClick event for a GUIButton)

#3
01/17/2007 (11:41 am)
First, please note that I just downloaded TorqueX last night (and bought TGB a couple weeks ago). So I'm pretty new.

In TGB scripting, you could set up and object to respond to mouse events. If you defined an "OnMouseDown" event for the object, it would get called when you clicked that object. Easy peasy.

So, I was hoping for that kind of functionality, but I didn't see any obvious way to do it. So, as you say, I guess I'd have to roll my own.

Thanks!
Adman
#4
01/17/2007 (12:06 pm)
@Adam - Yes, you could set up mouse events in TGB and all the other engines for that matter, but in TXE it doesn't currently exist. My guess is that this is mostly due to the fact that TXE is geared towards Xbox360, secondly because they focused on 2D first and the mouse isnt' as crucial in most 2D games as it is in 3D games.