From: Jonathan V T. <to...@ph...> - 2005-03-03 04:38:22
|
Friends, I am writing a simples 2D physics simulator for an amateur game I am working on, and the following problem has come up: I am trying to follow, more or less, Tutorial 3 from the webpage, in that I create my "physical objects" by associating them with bodies and I create my environment, which is fixed and immovable, by simply creating Geom objects without bodies. In linux, this works fine, but in Windows the line of the code in the collision callback which looks like: j.attach(geom1.getBody(),geom2.getBody()); Causes a nasty error. This is because if one of the Geom objects is an immovable object, getBody returns None. This behaviour is puzzling, since in Linux, I am clearly getting a body, perhaps where I shouldn't be. So the question is, how do you handle adding contact joints to objects which do not have bodies? Or, how do you make an object with a body permanantly fixed in space? Or, am I doing something totally ridiculous? Thanks in advance for any help that is offered. -Vincent PS - In this case, the geoms which are giving me trouble are simply GeomBox objects. |