My rayicking category patch is aviable here http://aliasrobotique.org/~souvarine/raypicking_category_1.diff
Took me quite a while to make it but, at least, I have learned a lot about soya's internals :) Here is how it work : Every object deriving from CoordSyst (world, body, terrain...) now have a 32 bits wide bitfield identifying the categories the object belongs. Bitfield is accessible trough the solid attribut. This allow 32 user defined categories. By default all object have their bitfield to 1 (objetc.solid = 1), this provide backward compatibility. World's raypick, raypick_b and RaypickContext methodes have an optional parameter named category (to 1 by default) identifying witch category of object these methodes should care about. In short the methodes will only care about an object if object.solid & category != 0. RaypickContext's raypick and raypick_b methodes also have the same optional parameter but to 0xffffffff by default. I have also added a get_items methode to RaypickContext witch return a list of all items inside the context. Hope you will find it usefull ;) Souvarine. _______________________________________________ Soya-user mailing list [email protected] https://mail.gna.org/listinfo/soya-user
