From: Diez B. R. <de...@we...> - 2008-04-07 14:50:19
|
> But how do I go back later, and adjust the mass? I've tried (using Pygame): > elif e.key == K_d: > #self.Ship(mass, position, ode.Body) > M = ode.Mass() > M.setSphere(2500, 0.05) > M.adjust(100) > print M > playerShip.setMass(M) > print playerShip.getMass(M) > > Yet this does nothing, (as far as I know) to the existing ship (it's > velocity doesn't change). Am I creating a new Mass for the object > instead of modifying an existing one? Obviously you are. You create a new one instead of manipulating an existing one. Regarding the effect that has: I'm not sure and can't experiment right now, and you don't give much information. Of course if any forces are applied, they should take the new mass into consideration. If that's not happening, I can only suggest removing the whole ship and replacing it with a new one to make sure internals are proper. But what do you expect to happen just because you alter the mass to the flying ship? Why should it experience any change in velocitiy? Diez |