realbasic-games
[Top] [All Lists]

Re: How to find a Group3D in a RB3DSpace

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: How to find a Group3D in a RB3DSpace
From: "Joseph J. Strout" <joe at realsoftware dot com>
Date: Sat, 19 Feb 2005 20:19:14 -0600
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <20050219180019 dot 6E676739937 at lists dot realsoftware dot com> <bd725d5d0e1e8daf25051b2b08a11e22 at uio dot satnet dot net>
At 3:15 PM -0500 2/19/05, Heinz J. Gattringer wrote:

Your suggestion sounds logical and I am sure it would work. It seems a bit redundant though for my purposes since all MyObjects are strored in an array anyway, so the index of that array provides an unique enough identifier for the objects, without the need for a new property ID.

Except the problem is that there is no fast way to find the ID given an object, which is what you generally need to do.

I think what it really comes down to is this: when the player clicks on an object in the Rb3DSpace I store that object in the local variable 'which' by way of "which = me.FindObject(x,y)". I then compare the object 'which' to all objects in the build in Rb3DSpace.Objects array. For some reason the
if Rb3DSpace.Objects.item(id)=which
comparison is always true when 'which' is a Group3D

No, that's not the problem, because FindObject will NEVER return a Group3D. It returns the actual object that was clicked, not one of the groups that object may be in.

But you've sent me a demo project (off-list), which I haven't had a chance to look at yet, so I'll quit butting in until I do. :)

Best,
- Joe

--
REAL World 2005 - The REALbasic User Conference
March 23-25, 2005, Austin, Texas
<http://www.realsoftware.com/realworld>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>