ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
Collision Detection (Sdk)
Collision Detection // SdkcanopusDec 11, 1998, 6:02pm
For a bot to avoid objects that stand in its way, it probably must do an
aw_query of its surroundings. AW_EVENT_CELL_OBJECT will give us the AW_OBJECT_MODEL for the objects in adjacent cells. Perhaps the simplest strategy is to treat an object as a sphere when calculating the space it occupies. This means that to detect collisions the bot program must keep and access a list of models and their MAXSIZE attributes for each world the bot might inhabit. It would be nice if instead the AWAPI had an AW_OBJECT_MAXSIZE attribute that was available in the context of AW_EVENT_CELL_OBJECT. jeanphiDec 11, 1998, 11:01pm
Hi Canopus,
You know that bots can walk through objects naturally ? maybe you can save a lot of processing time with not writing this pocedure :) jeanphi =?iso-8859-1?q?eep=b2?=Dec 12, 1998, 5:20pm
A sphere would be way too complicated when just the cube bounding box can be used.
[View Quote] > For a bot to avoid objects that stand in its way, it probably must do an > aw_query of its surroundings. AW_EVENT_CELL_OBJECT will give us the > AW_OBJECT_MODEL for the objects in adjacent cells. Perhaps the simplest > strategy is to treat an object as a sphere when calculating the space it > occupies. This means that to detect collisions the bot program must keep > and access a list of models and their MAXSIZE attributes for each world > the bot might inhabit. It would be nice if instead the AWAPI had an > AW_OBJECT_MAXSIZE attribute that was available in the context of > AW_EVENT_CELL_OBJECT. canopusDec 12, 1998, 5:59pm
Where is this "cube bounding box" in the AWAPI?
If the server has access to the cube bounding box for each object, then maybe the SDK should make it available, or at least the dimension that is the maximum one. The max dimension, or sphere idea, just would be simpler or faster to compute. I think a lot of people want bot avatars to have the option of moving around objects, like other avatars. [View Quote] > A sphere would be way too complicated when just the cube bounding box can be used. > [View Quote] =?iso-8859-1?q?eep=b2?=Dec 13, 1998, 4:16pm
Dunno if it's even implemented in the SDK, but RenderWare uses bounding boxes (cubes), and AW uses RW, so... Although AW's avatar collision isn't even based off avatar bounding boxes, but a 1mx1m square in the middle of the avatar. Lame, eh? Hence why really small avatars (<1m³) can't get close to many things horizontally. It really kills the effect of having a small avatar, too. :/
See http://tnlc.com/rw/rwx.html#collision for more info. [View Quote] > Where is this "cube bounding box" in the AWAPI? > > If the server has access to the cube bounding box for each object, then maybe the SDK > should make it available, or at least the dimension that is the maximum one. The max > dimension, or sphere idea, just would be simpler or faster to compute. I think a lot > of people want bot avatars to have the option of moving around objects, like other > avatars. canopusDec 13, 1998, 6:12pm
Thanks, Eep². So until the SDK has a method that gives us access to the bounding box dimensions, is there a way for an AWAPI program to read the same information from an *.rwx file, such as in the AW cache files?
[View Quote] > Dunno if it's even implemented in the SDK, but RenderWare uses bounding boxes (cubes), and AW uses RW, so... Although AW's avatar collision isn't even based off avatar bounding boxes, but a 1mx1m square in the middle of the avatar. Lame, eh? Hence why really small avatars (<1m³) can't get close to many things horizontally. It really kills the effect of having a small avatar, too. :/ > > See http://tnlc.com/rw/rwx.html#collision for more info. > [View Quote] andras sarkozyDec 13, 1998, 10:23pm
If you have an access to the .rwx file - you prolly have the access to the registry.txt too. That is the simplest way to get the info. If you insist to get all 3 coos, try rwxtract.exe from www.storage.co.hu/tools.html. You'll get the bounding box dimension from it.
Andras [View Quote] > Thanks, Eep². So until the SDK has a method that gives us access to the bounding box dimensions, is there a way for an AWAPI program to read the same information from an *.rwx file, such as in the AW cache files? > [View Quote] roland vilettDec 14, 1998, 7:14pm
In worlds with a registry, the server does know the width and depth of each
object, at least if the information in the registry is correct. Although height information is present in the registry.txt file itself, it is not processed by the world server so it's not currently available. In worlds without a registry, no object dimension information is available, so it couldn't be provided through the SDK. Making this information available via the SDK is an interesting idea...although I wouldn't want to make it part of the AW_EVENT_CELL_OBJECT event since this is the same event the browser users to query property and it has no use for that extra information, so it would be a waste of bandwidth for browser users. The AW browser uses the geometry information from the .rwx file itself in order to determine the exact size and shape of an object for the purpose of collision detection. Realistically, the only way an SDK application could do this in general purpose fashion would be to do the same thing as the browser: download the .rwx files itself and load them into RenderWare and then use the RenderWare API to determine the exact size and shape. However a bot custom-built for a particular world with a known set of objects could always just have its own preset private list of bounding box dimensions for all objects in the world. This would be a far simpler solution, although much more limited. A complete overhaul of the AW registry system has been planned for a while now, and I really hope it will be something we can do in the next version after 2.1...this overhaul would definitely include a new set of SDK methods that would allow an SDK application to interact with the object registry information in some detail. -Roland [View Quote] =?iso-8859-1?q?eep=b2?=Dec 15, 1998, 6:01pm
Uh, Andras? What's "coos"? Do you mean "coords"? Heh...I've been meaning to ask you ever since your readme.txt in rwxtract.zip. ;P
[View Quote] > info. If you insist to get all 3 coos, try rwxtract.exe from www.storage.co.hu/tools.html. You'll get the bounding box dimension andras sarkozyDec 15, 1998, 6:19pm
Too bad you did not ask because I would correct it. I learned this "alphabet soup" stuff in AW and Englis is my second language. Yes - I meant coordinates :o)
Thanks Eep. [View Quote] > Uh, Andras? What's "coos"? Do you mean "coords"? Heh...I've been meaning to ask you ever since your readme.txt in rwxtract.zip. ;P > [View Quote] |