get collding objects
hello all. im having a bit of trouble,i have a patchgrid and i want to check if theres anything in a patch , first off i created a small mobile object , at each iteratoin it goes around each patch and checks neighbors , this works fine but its checking alot of neighbors and its using alot of cpu time.
i was hoping to make this mobile into the same shape as the patch and then use
neighbors=(Scanfloor get-colliding-objects).
but it doesnt show the statoinary objects OR the multibody as a colliding object. Am i using this in the wroung context?
thanks NoZ
»
Submitted by NoZ on Sat, 2006-09-16 19:22.
- Login to post comments

get collding objects
"get-colliding-objects", as noted in the documentation, is generally not the best way to figure out if an object is colliding.
Instead, you should be setting up a collision handler method using "handle-collisions".
Now the reason that "get-colliding-objects" is not doing what you want is that it only detects objects for which collisions are currently being handled. In other words, it doesn't work if you haven't already set up a collision handler. It is really only to be used for "testing out" the positions on objects when they're created.
- jon
get collding objects
aha
making a collisoin handler is feasable but it adds alot of complexity scince i dont really care about the floor scanner all i care about is the patch and if anythings in it. I just had to use a mobile object becouse of the limitatoins on the abstract class.
Also i dont care what kind of object is in the patch,So is there a way of saying
"handle collisoins with any object" so it works with everything now and in the forseeable future?
thankyou for your time
NoZ