Tweaking some settings to get the cups to behave nicely #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I had set cube collision shapes on the cups to work around issues with the cylinder shapes. After getting some feedback experimented with changing settings.
First, you can't set the margin below 0.01 in the IDE. That is 1cm for a cup that is 10 cm high. Way to much.
But you can change it programmatically so I've set it to 0.001.
The problem we now get is that bullet has great problems handling this properly unless you up the physics update rate. They recommend going as high as 300 updates per second.
Because we want the physics update rate to be in sync with the headset update rate I've added a factor to our init script that defaults setting the update rate to 2x the headset rate (160 updates per second on a Rift S). That already makes the simulation of our cups pretty stable.
Going higher works even better.