diff options
author | Robert Adams | 2013-08-14 14:36:13 -0700 |
---|---|---|
committer | Robert Adams | 2013-08-14 14:49:24 -0700 |
commit | e8b1e91a1d4bb3ca65886c367c654a82033f4e03 (patch) | |
tree | bdd2f2d34b4f68f3335925a977a3b3d7e6a1cb86 /OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |
parent | BulletSim: add physical object initialized flag so updates and collisions (diff) | |
download | opensim-SC-e8b1e91a1d4bb3ca65886c367c654a82033f4e03.zip opensim-SC-e8b1e91a1d4bb3ca65886c367c654a82033f4e03.tar.gz opensim-SC-e8b1e91a1d4bb3ca65886c367c654a82033f4e03.tar.bz2 opensim-SC-e8b1e91a1d4bb3ca65886c367c654a82033f4e03.tar.xz |
BulletSim: include check for volume detect in check for zeroing avatar motion.
Normally, avatar motion is zeroed if colliding with a stationary object so
they don't slide down hills and such. Without volume detect check this also
allowed avatars to stand on volume detect objects and to have some jiggling
when they were in the volume detect object. This commit fixes both.
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs index b26fef0..9dc52d5 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |||
@@ -132,7 +132,8 @@ public abstract class BSPhysObject : PhysicsActor | |||
132 | public string PhysObjectName { get; protected set; } | 132 | public string PhysObjectName { get; protected set; } |
133 | public string TypeName { get; protected set; } | 133 | public string TypeName { get; protected set; } |
134 | 134 | ||
135 | // Set to 'true' when the object is completely initialized | 135 | // Set to 'true' when the object is completely initialized. |
136 | // This mostly prevents property updates and collisions until the object is completely here. | ||
136 | public bool IsInitialized { get; protected set; } | 137 | public bool IsInitialized { get; protected set; } |
137 | 138 | ||
138 | // Return the object mass without calculating it or having side effects | 139 | // Return the object mass without calculating it or having side effects |
@@ -356,6 +357,8 @@ public abstract class BSPhysObject : PhysicsActor | |||
356 | // On a collision, check the collider and remember if the last collider was moving | 357 | // On a collision, check the collider and remember if the last collider was moving |
357 | // Used to modify the standing of avatars (avatars on stationary things stand still) | 358 | // Used to modify the standing of avatars (avatars on stationary things stand still) |
358 | public bool ColliderIsMoving; | 359 | public bool ColliderIsMoving; |
360 | // 'true' if the last collider was a volume detect object | ||
361 | public bool ColliderIsVolumeDetect; | ||
359 | // Used by BSCharacter to manage standing (and not slipping) | 362 | // Used by BSCharacter to manage standing (and not slipping) |
360 | public bool IsStationary; | 363 | public bool IsStationary; |
361 | 364 | ||
@@ -435,6 +438,7 @@ public abstract class BSPhysObject : PhysicsActor | |||
435 | 438 | ||
436 | // For movement tests, remember if we are colliding with an object that is moving. | 439 | // For movement tests, remember if we are colliding with an object that is moving. |
437 | ColliderIsMoving = collidee != null ? (collidee.RawVelocity != OMV.Vector3.Zero) : false; | 440 | ColliderIsMoving = collidee != null ? (collidee.RawVelocity != OMV.Vector3.Zero) : false; |
441 | ColliderIsVolumeDetect = collidee != null ? (collidee.IsVolumeDetect) : false; | ||
438 | 442 | ||
439 | // Make a collection of the collisions that happened the last simulation tick. | 443 | // Make a collection of the collisions that happened the last simulation tick. |
440 | // This is different than the collection created for sending up to the simulator as it is cleared every tick. | 444 | // This is different than the collection created for sending up to the simulator as it is cleared every tick. |