setCollisionListener

tone

23-03-2007 14:48:01

I'm curious why this method is on the World and not on the Space.

I might have different collision spaces which might segregate handling between different types, but I'm only permitted a single World (right? .. hmm maybe I was wrong on this point... I seem to be permitted more than one World)

I guess I can create a main handler that dispatches this to separate sub-handlers, but I'm curious why the World is tasked with deciding how to handle collisions when Spaces seem a natural for managing this.

tone

rewb0rn

26-03-2007 23:25:56

I personally use different spaces only for organizing objects that dont collide with each other and then collide objects that are in different spaces, so that will fit the need for one collision listener per world, as you said you would use different worlds for different listeners, but then you are not able to collide between objects that are contained within different worlds. but you can collide manually and set a listener for each collision yourself. (see _collide() or collide(), not sure which one, method of geometry)