Game Development Community

Face mouse vs. mouse draggable

by Orion Elenzil · in Torque Game Builder · 05/25/2008 (11:07 am) · 1 replies

Howdy all -
just getting started w/ TGB, so forgive me if i'm covering old territory here.

i'm seeing a couple issues with the "mouse draggable" behavior.

1. if i give an object both "mouse draggable" and "face mouse", the object faces the mouse very nicely until i go ahead and drag it, after which it only faces the mouse when the mouse is over the object.

2. if i have two mouse-draggable objects on top of each other, when i click and drag, they both move (good), but when i mouse-up, one of them continues dragging.

not sure if it's relevant, but these examples are with static sprites in the TGB 1.7.3 "Behaviors Playground" project.



on an unrelated note, the default project doesn't seem to be set up right to find many of the particle effect resources. eg, i do a clean install, open the project "games/tutorialbase/project.t2dProj", and most of the particle effects are blank, apparently because of issues finding the image files. the image files (eg "particles6.png") are present up in "tgb\resources\particlesArt\images", but they're not loading in the editor.

while i'm at it, is it just me, or are the tutorials in the documentation a bit out of date ? eg, the intro tutorial says to open a "TGB" project, which i just can't find, and i'm presuming it's the tutoralbase project instead.

#1
05/25/2008 (12:58 pm)
Hmm, I think I might have messed up the face mouse behavior then. It's very possible that I forgot to add onMouseDragged (something like that) as a callback for the facing too. If that's the case, it's an easy fix.

The second problem is a bit weirder. That's most likely a problem with the source generation of callbacks and not the script. Maybe someone else has some time to take a look at it if you don't.

As for the project, maybe you have to go to Project->Resources (or that sort of menu) and add the particle one.

Hope that helped a little ;)