Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Share Worlds (http://www.alice.org/community/forumdisplay.php?f=6)
-   -   Humvee driver with collision detection (http://www.alice.org/community/showthread.php?t=7701)

davidghemer 11-30-2011 09:30 PM

Humvee driver with collision detection
 
1 Attachment(s)
The attached world lets you drive a Humvee around. I've included two kinds of collision detection. One is for circular objects where the [I]distance to[/I] function is used.
The second is for rectangular objects where I use a combination of [I]is right of[/I],[I] is left of[/I] etc functions and [I]distance to left[/I], [I]distance to right[/I] etc.

This works reasonably well. I still get some false collisions on corners - probably because of the fact I use half the Humvee depth as my threshold.

It also (very) occasionally drives into walls.

Other than that it seems to work fairly well.

Mr Kidnapper 11-30-2011 10:47 PM

It works well. The only cases it doesn't work is when running into corners. It also doesn't work on odd shaped objects. You would have to tailor your objects towards your collision for it to work. For example, the windmill is a bit odd because the blades end up increasing the "radius" of the object by being an extending part of the windmill. This would be fixed by separating the extending part from the object and placing it on the same hierarchy level, but that would be silly. The house with the steps is odd in that the steps are the extending part. If you separated the steps and placed them on the same level, then it would allow for more complex collision.


All times are GMT -5. The time now is 02:54 PM.

Copyright ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.