Hi
I'm currently developing a little game, mostly as a personal playground. Your physics library is just GREAT! It's very adjustable and performs great on computer that should have been scraped a long time ago. I've managed my previous problems, but it took some time. So before spending all my holidays on this problem, I thought I could ask the developers for a little hint.
Is it possible to make the "angular momentum" ("spin" in my language) go to, or close to zero? While also reserving the weight/mass of the object?
I currently use "angularImpulse" to create a rotation on a object to give it speed on the ground, as well as limiting the maximum speed of angle. But I do not want the object to contain so much rotational energy that it could make itself move when the angularImpulse is not active. I can archive a little of this if I reduce the mass, but then the game crashes due to a spring instability connected to the object. Makes sense of course, as this is not how the world works in real life.
I have not archived any result using the "density" feature. Perhaps I'm using it wrong? Or perhaps I am thinking in the wrong direction?
If it helps (or you are interested), this is my project: http://mopolauta.moposite.com/viewtopic ... 6b&start=0
I'm planning on a freeware or open-source license on the game. It shouldn't produce any problems with the BEPUphysics license?
Angular Momentum
Re: Angular Momentum
Glad you like it!
The angularMomentum and angularVelocity property of an entity can be used to set the momentum/velocity arbitrarily. You could also try tuning the inertiaTensor of the body by scaling it up or down by some factor (downscaling it would keep the motorcycle from jumping forward as much when a high angular velocity wheel touched down, but it can also have stability side effects).
Density is really only used for buoyancy calculations. It's possible to have an 'incorrect' density that doesn't match mass / volume to tune how much an object floats.
The project looks neat; there shouldn't be any licensing issues. Other developers who want to modify your source and re-release it would have to understand and agree to the BEPUphysics licensing terms though (under the noncommercial agreement unless they want to sell their version).
The angularMomentum and angularVelocity property of an entity can be used to set the momentum/velocity arbitrarily. You could also try tuning the inertiaTensor of the body by scaling it up or down by some factor (downscaling it would keep the motorcycle from jumping forward as much when a high angular velocity wheel touched down, but it can also have stability side effects).
Density is really only used for buoyancy calculations. It's possible to have an 'incorrect' density that doesn't match mass / volume to tune how much an object floats.
The project looks neat; there shouldn't be any licensing issues. Other developers who want to modify your source and re-release it would have to understand and agree to the BEPUphysics licensing terms though (under the noncommercial agreement unless they want to sell their version).
Re: Angular Momentum
Thank you
I think I'll try playing around with "inertiaTensor" then, sounds promising. Wheel-level collision detection events could help as well. I'll post a update when I get there.
Again, thank you for making this amazing piece of software. It is so fun making huge box-towers, and destroying them.
I think I'll try playing around with "inertiaTensor" then, sounds promising. Wheel-level collision detection events could help as well. I'll post a update when I get there.
Again, thank you for making this amazing piece of software. It is so fun making huge box-towers, and destroying them.
Re: Angular Momentum
Works like a charm! Didn't even need collision detection events.
I could even use it to improved the breaking algorithm. Now the game is finally in fully playable state, with this, beta isn't too far away. Thank you very much.
Code: Select all
Entity.localSpaceInertiaTensor *= Matrix.CreateScale(0,1f);