S
Sarron
Guest
Hello again. =)
In a nutshell, my goal here is to have objects change their state depending on what entities are close to them within some range (or, even better, within some arbitrary volume around them) and based upon the state of those entities.
Obviously, there are existing I/Os for Touch and for entering or exiting a trigger area, but what if I want to find out who's near entity A in a think method of that entity and respond to the state of those entities?
First, is it possible to find out (directly) which entities are within an arbitrary volume around an entity during a Think? Second, could I then query data about that entity directly from it as I go through a list of them?
What it comes down to is the question of whether there an easy or straightforwardway to do this, or would it likely involve something complex?
An example of a complex solution would be having every entity I care about register itself, in a sense, as being in each volume it's within during it's own think. Each entity would also register the pertainent information about it at that time. Then, an entity could just check with that registry to find out about the entities around it. However, this is obviously a rather complex, and possibly CPU and network taxing way to do things.
Thanks for any input/insight anyone could offer. =)
In a nutshell, my goal here is to have objects change their state depending on what entities are close to them within some range (or, even better, within some arbitrary volume around them) and based upon the state of those entities.
Obviously, there are existing I/Os for Touch and for entering or exiting a trigger area, but what if I want to find out who's near entity A in a think method of that entity and respond to the state of those entities?
First, is it possible to find out (directly) which entities are within an arbitrary volume around an entity during a Think? Second, could I then query data about that entity directly from it as I go through a list of them?
What it comes down to is the question of whether there an easy or straightforwardway to do this, or would it likely involve something complex?
An example of a complex solution would be having every entity I care about register itself, in a sense, as being in each volume it's within during it's own think. Each entity would also register the pertainent information about it at that time. Then, an entity could just check with that registry to find out about the entities around it. However, this is obviously a rather complex, and possibly CPU and network taxing way to do things.
Thanks for any input/insight anyone could offer. =)