aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-05-30 22:04:59 +0100
committerJustin Clark-Casey2014-06-10 20:21:44 +0100
commit4bc2201453be3b25788def8bca82e376d010fc10 (patch)
treef760d6c7335553136d01abf89cac5b630bcbbc46 /OpenSim/Region
parentAdd a 0 parameter overload for RestClient.Request() for use when no auth is r... (diff)
downloadopensim-SC_OLD-4bc2201453be3b25788def8bca82e376d010fc10.zip
opensim-SC_OLD-4bc2201453be3b25788def8bca82e376d010fc10.tar.gz
opensim-SC_OLD-4bc2201453be3b25788def8bca82e376d010fc10.tar.bz2
opensim-SC_OLD-4bc2201453be3b25788def8bca82e376d010fc10.tar.xz
Fix issue with BulletSim avatar level flight jitter by commenting out RawVelocity update threshold for now in BSCharacter.UpdateProperties().
For some reason as yet unidentified (feedback?) a threshold above 0.4 here causes the RawVelocity to move between a lower and upper bound rather than remaining constant. The RawVelocity increased until it triggered the threshold update, at which point it started to decrease until it again triggered the threshhold update. This delta-v was enough to exceed the checks in ScenePresence.SendTerseUpdateToAllClients() and produce jittery avatar flight because of the fluctuating velocity. With a threshold of 0.4 (or 0, as with ODE), the RawVelocity remains constant in BulletSim and so avatar flight becomes mostly smooth - remaining occasional glitches appear to be a result of errors in distance extraploation. There are no obvious problems with commenting out the threshold. Misterblue, if this is wrong or I've missed some subtlety here, please feel free to revert and/or correct. The same considerations may or may not apply to object velocity updates.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs13
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
index dfcd2bf..9b56fb4 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
@@ -744,7 +744,18 @@ public sealed class BSCharacter : BSPhysObject
744 // and will send agent updates to the clients if velocity changes by more than 744 // and will send agent updates to the clients if velocity changes by more than
745 // 0.001m/s. Bullet introduces a lot of jitter in the velocity which causes many 745 // 0.001m/s. Bullet introduces a lot of jitter in the velocity which causes many
746 // extra updates. 746 // extra updates.
747 if (!entprop.Velocity.ApproxEquals(RawVelocity, 0.1f)) 747 //
748 // XXX: Contrary to the above comment, setting an update threshold here above 0.4 actually introduces jitter to
749 // avatar movement rather than removes it. The larger the threshold, the bigger the jitter.
750 // This is most noticeable in level flight and can be seen with
751 // the "show updates" option in a viewer. With an update threshold, the RawVelocity cycles between a lower
752 // bound and an upper bound, where the difference between the two is enough to trigger a large delta v update
753 // and subsequently trigger an update in ScenePresence.SendTerseUpdateToAllClients(). The cause of this cycle (feedback?)
754 // has not yet been identified.
755 //
756 // If there is a threshold below 0.4 or no threshold check at all (as in ODE), then RawVelocity stays constant and extra
757 // updates are not triggered in ScenePresence.SendTerseUpdateToAllClients().
758// if (!entprop.Velocity.ApproxEquals(RawVelocity, 0.1f))
748 RawVelocity = entprop.Velocity; 759 RawVelocity = entprop.Velocity;
749 760
750 _acceleration = entprop.Acceleration; 761 _acceleration = entprop.Acceleration;