[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] PyODE



The two options I know of are to either force the object to remain on the same axis by arbitrarily setting z=0 after collision response; and to construct two planes at say, z=1 and z=-1 and making your objects of z-width=1.98 or so.  The second method is probably more reliable, as you are using the physics engine to constrain the axis.  The first method could possibly result in collision response breaking in some cases and having penetration happen.  Also, the first method doesn't deal with any rotation that occurs - the two planes will prevent rotation most of the time.

Maybe combining the methods, making sure no z rotation is happening every so often, and using two planes, will give the best results.