Problem with cylinders.

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Danthekilla
Posts: 136
Joined: Sun Jan 17, 2010 11:35 am

Problem with cylinders.

Post by Danthekilla »

Hey norbo, we seem to be having many issues with the cylinder entity type.

They work pretty well when they are rolling on their sides but when they are up-right they have many stability issues and seem to have no friction or roll bounce forever.

My sim has pretty normal settings, with a iteration count of 15 (high accuracy) and a internal timestep of 1/30 i think
Video of the problem here http://www.youtube.com/watch?v=MfwojslftXk (Note it normally happens all the time to every cylinder but when recording my framerate drops heaps and reduces the issue)
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Problem with cylinders.

Post by Norbo »

That type of behavior isn't entirely unexpected since there exists no 'rolling friction.' The only thing reducing angular momentum when it gets into a dance like that is angular damping. You can try increasing the angular damping of the cylinder a bit to force it to settle down quicker.

Another factor could be the inertia tensor. You could try scaling the local space inertia tensor up or down a little bit to see how it reacts. Going too far either way will introduce different kinds of instability, though.

Increasing the timestep duration to 1/60 seconds could also help, though that would obviously involve doing more updates to cover the same amount of time (which the Xbox wouldn't enjoy). 1/30 seconds is good enough for many simulations but it can be just too long of a timestep for detailed and stable physics in the general case.
Post Reply