Game Development Community

Is pickPoint deprecated?

by Rodney Rindels - Torqued · in Torque Game Builder · 05/15/2006 (10:23 pm) · 3 replies

Something that seems to have worked previously for me Alpha2, is now acting weird in beta 3.

I am working on picking up objects created when something in the scene dies and drops items.

previously I used.

function sceneWindow2D::onMouseDown( %this, %mod, %worldPos, %mouseClicks )
{
        //lets get a list of all the objects at the clicked point in the t2dScene
        %objList = sceneWindow2D.pickPoint(%worldPos);
        //lets get a count of how many objects in the list
        %objCount = getWordCount(%objList);
        echo("objects at " SPC %worldpos SPC ":" SPC %objCount);
       //loop objects removed to keep post short
}

now in my scene when I click anywhere I started getting this in console.

shootemtest/main.cs (68): Unknown command pickPoint.
  Object sceneWindow2D(2198) sceneWindow2D -> t2dSceneWindow -> GuiControl -> SimGroup -> SimSet -> SimObject

has pickPoint changed, or am I just using it wrong, I'm pretty sure this used to work for me?

Thanks in advance.

Rod

#1
05/16/2006 (12:20 am)
PickPoint is a member of t2dSceneGraph, not t2dSceneWindow. You can find more detail if you look in the reference doco.

- Melv.
#2
05/16/2006 (1:10 am)
I got confused because the way the naming was in the tutorial on TDN I guess. I do read the documentation first before posting. The fact that we get mouse actions with the Window, and objects from the scene makes sense now, but originally It didn't properly link up in the ole nogg'n.

brain needs some of that good stuff you guys had in Oregon last week.....
#3
05/16/2006 (2:14 am)
No problem Rodney; I wasn't trying to give you grief over reading the doco, I kinda' automatically make that statement these days. :)

- Melv.