well its not a total solution... 
11272006, 02:49 AM
but there is another way to test for collisions: the math
boxes collide if the distance between them in all axes (forward, left, above) is less than the sum of half their widths in each of those dimensions)  (b.depth_as_seen_by_x + a.depth_as_seen_by_x) <= (a.forward_distance_to_x) and (b.width ... ) and (b.length ...). as for handling collisions, perhaps you can try the left,forward, down or whatever its called function of world to revert to an earlier position, or you could use a dummy object infront of the avatar that you perform the collision detection on (note that you'd need another for backing up)  this way the person "hits" the wall before the intersect it. alternatively, if you are willing to sacrifice free user movement, you could represent the maze as a 2d array of tiles, with each tile either being passable or not, as an array, and just let the user move forward if the destination element  since alice doesn't support twodimensional arrays, you need to use a scheme like element index of (x,y) = x * mazew + y. (note that this will be a maintance nightmare if you want to edit/resize the maze though!)
also, the formula for spheresphere collision is if the sum of the radii is less than or equal to their distance. cube to circle is similar, but you have to find the "closest point" on the cube(constrain the x,y,z values to 1/2 width ,height, or depth, until you get the closest point). note that these solutions don't work so well if you have objects that aren't upright.
finally, if you really need to add collision detection natively to alice, you might want to program it in, in java. (this is probably the most timeconsuming of my suggestions, but if you are taking an independent study course, then you have plenty of time right?). anyways, what i'd recommend for that is to add a world function that takes two objects, and returns a boolean if they collide, and use java to implement that functionality. also, you'd probably want it to check the objects parts against the whole other object (or maybe just its parts), but be careful about that one, since if you're not careful, you might end up with an n^2 implementation.
actually, looking at the source i'm surprised to find the following file
"edu.cmu.cs.stage3.alice.core.question.IsColliding With". i'm not sure if this file implements what you are looking for, but based on a cursory look at the source code and based on the name, i beleive this is what what you are looking for. now all you probably need to do is to mod the editor to allow you to put this in (maybe you could even manually edit an object to have a question of this type in a function and then just import that object into a world and use that function(which if it works  i haven't looked at the alice file loading code to see if it uses a factory or the java.lang.reflection api when instantiating objects), would allow a compatible solution.
