Game Development Community

Detecting WorldEditor position changes via mouse

by John Cooney · in Torque Game Engine · 10/14/2005 (6:48 pm) · 3 replies

I'm trying to create a NavPointMarker for our A* set-up that calls the pathfinder algorithm when it gets moved in the editor. How do I figure out when the marker object gets moved? I found the inspectPostApply function, but what if the level builder doesn't use apply? How do I detect that the object's position has been changed using the mouse? All help appreciated. Thanks.

#1
10/14/2005 (11:33 pm)
Wild guess, but try inspectPreApply()? I know it's there, just unsure as to what it's best uses are.
#2
10/17/2005 (12:49 pm)
Okay, I'll give the 'Pre' a try and see what blows up.

Thanks for your reply.

Edit:
Not sure inspectPreApply() does what I want it to. I'll investigate 'pre' further, but I put a printf in there that only shows up when I use Apply, just like inspectPostApply().
#3
11/01/2005 (2:22 pm)
Looks like WorldEditor's on3DMouseDragged is the function I needed.
Moving with the mouse triggers printf's within the function, so now I just need to get the mouse drags to interact with my marker functions.