Well, maintaining an upright orientation for an object in ODE is *very* easy with an angular motor (BTW the AngularMotor wrapper class is incomplete, as it misses parameter setting functions, and has a negated condition in nb_axes.__set__).
Basically this should make a body maintain a constant orientation without strange side-effects: motor = soya.AngularMotor( body ) # euler mode motor.mode = 1 # this is buggy in codebase motor.nb_axes = 3 motor.setAxis( 0, Vector(body, 1,0,0) ) motor.setAxis( 1, Vector(body, 0,1,0) ) motor.setAxis( 2, Vector(body, 0,0,1) ) motor.setAngle(0, 0.0) motor.setAngle(1, 0.0) motor.setAngle(2, 0.0) motor.lo_stop = motor.hi_stop = 0.0 # these are missing from AngularMotor, but are trivial to implement motor.lo_stop2 = motor.hi_stop2 = 0.0 motor.lo_stop3 = motor.hi_stop3 = 0.0 The second problem is rather tricky, but it can be solved pretty well, by using a ray for feet, which also acts as a dampened spring -- the ODE list has some ideas/examples for this. Sure, this is not very easy, but it has the advantage of having correct collision/force response throughout the world, including controlled avatars too. And the CPU-cost part can be greatly reduced by enabling auto-disabling of bodies, and having them enabled when the position is invalidated, or when something collides with them. By the way this makes simulations a lot more stable too. Well, this can all be done outside the engine, except for the broken AngularMotor class, which has to be finished. -- Zoltan Dome On 9/22/07, Souvarine <[EMAIL PROTECTED]> wrote: > > There is some interesting discussions on the ODE mailing list about how to > do this. There is also a little game aviable where the programmer tried to > do this. From what I've read on the mailing list and in the comments of that > game the result is not very good. > > There were two main problems with this : > - first how to make a caped cylinder geom stay upright > - second how to make the body move smoothly as if the character was walking > > I think that another problem is that ODE is rather CPU costly. I don't > think it is possible to manage many characters with this system at the same > time. > > Still, it is not because something could not be done before that it can not > be done now. > > Souvarine. > _______________________________________________ Soya-user mailing list [email protected] https://mail.gna.org/listinfo/soya-user
