aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs8
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSParam.cs3
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs8
-rw-r--r--bin/OpenSim.ini.example5
-rw-r--r--bin/OpenSimDefaults.ini3
5 files changed, 24 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
index a303972..4c54f9f 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
@@ -174,15 +174,19 @@ public sealed class BSCharacter : BSPhysObject
174 PhysScene.PE.UpdateSingleAabb(PhysScene.World, PhysBody); 174 PhysScene.PE.UpdateSingleAabb(PhysScene.World, PhysBody);
175 175
176 // Do this after the object has been added to the world 176 // Do this after the object has been added to the world
177 PhysBody.collisionType = CollisionType.Avatar; 177 if (BSParam.AvatarToAvatarCollisionsByDefault)
178 PhysBody.collisionType = CollisionType.Avatar;
179 else
180 PhysBody.collisionType = CollisionType.PhantomToOthersAvatar;
181
178 PhysBody.ApplyCollisionMask(PhysScene); 182 PhysBody.ApplyCollisionMask(PhysScene);
179 } 183 }
180 184
181
182 public override void RequestPhysicsterseUpdate() 185 public override void RequestPhysicsterseUpdate()
183 { 186 {
184 base.RequestPhysicsterseUpdate(); 187 base.RequestPhysicsterseUpdate();
185 } 188 }
189
186 // No one calls this method so I don't know what it could possibly mean 190 // No one calls this method so I don't know what it could possibly mean
187 public override bool Stopped { get { return false; } } 191 public override bool Stopped { get { return false; } }
188 192
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
index 867d6ff..e7f4def 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
@@ -132,6 +132,7 @@ public static class BSParam
132 public static float PhysicsUnmanLoggingFrames { get; private set; } 132 public static float PhysicsUnmanLoggingFrames { get; private set; }
133 133
134 // Avatar parameters 134 // Avatar parameters
135 public static bool AvatarToAvatarCollisionsByDefault { get; private set; }
135 public static float AvatarFriction { get; private set; } 136 public static float AvatarFriction { get; private set; }
136 public static float AvatarStandingFriction { get; private set; } 137 public static float AvatarStandingFriction { get; private set; }
137 public static float AvatarAlwaysRunFactor { get; private set; } 138 public static float AvatarAlwaysRunFactor { get; private set; }
@@ -571,6 +572,8 @@ public static class BSParam
571 new ParameterDefn<float>("TerrainCollisionMargin", "Margin where collision checking starts" , 572 new ParameterDefn<float>("TerrainCollisionMargin", "Margin where collision checking starts" ,
572 0.04f ), 573 0.04f ),
573 574
575 new ParameterDefn<bool>("AvatarToAvatarCollisionsByDefault", "Should avatars collide with other avatars by default?",
576 true),
574 new ParameterDefn<float>("AvatarFriction", "Factor to reduce movement against an avatar. Changed on avatar recreation.", 577 new ParameterDefn<float>("AvatarFriction", "Factor to reduce movement against an avatar. Changed on avatar recreation.",
575 0.2f ), 578 0.2f ),
576 new ParameterDefn<float>("AvatarStandingFriction", "Avatar friction when standing. Changed on avatar recreation.", 579 new ParameterDefn<float>("AvatarStandingFriction", "Avatar friction when standing. Changed on avatar recreation.",
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs
index 85ef64b..5932461 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs
@@ -190,6 +190,7 @@ public class BulletHMapInfo
190public enum CollisionType 190public enum CollisionType
191{ 191{
192 Avatar, 192 Avatar,
193 PhantomToOthersAvatar, // An avatar that it phantom to other avatars but not to anything else
193 Groundplane, 194 Groundplane,
194 Terrain, 195 Terrain,
195 Static, 196 Static,
@@ -231,7 +232,12 @@ public static Dictionary<CollisionType, CollisionTypeFilterGroup> CollisionTypeM
231 { CollisionType.Avatar, 232 { CollisionType.Avatar,
232 new CollisionTypeFilterGroup(CollisionType.Avatar, 233 new CollisionTypeFilterGroup(CollisionType.Avatar,
233 (uint)CollisionFilterGroups.BCharacterGroup, 234 (uint)CollisionFilterGroups.BCharacterGroup,
234 (uint)(CollisionFilterGroups.BAllGroup & ~CollisionFilterGroups.BCharacterGroup)) 235 (uint)(CollisionFilterGroups.BAllGroup))
236 },
237 { CollisionType.PhantomToOthersAvatar,
238 new CollisionTypeFilterGroup(CollisionType.PhantomToOthersAvatar,
239 (uint)CollisionFilterGroups.BCharacterGroup,
240 (uint)(CollisionFilterGroups.BAllGroup & ~CollisionFilterGroups.BCharacterGroup))
235 }, 241 },
236 { CollisionType.Groundplane, 242 { CollisionType.Groundplane,
237 new CollisionTypeFilterGroup(CollisionType.Groundplane, 243 new CollisionTypeFilterGroup(CollisionType.Groundplane,
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index 573180a..0374877 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -619,6 +619,11 @@
619 ; ForwardOfflineGroupMessages = true 619 ; ForwardOfflineGroupMessages = true
620 620
621 621
622[BulletSim]
623 ;# {AvatarToAvatarCollisionsByDefault} {[Startup]physics:BulletSim} {Should avatars collide with each other?} {true false} true
624 AvatarToAvatarCollisionsByDefault = true
625
626
622[ODEPhysicsSettings] 627[ODEPhysicsSettings]
623 ;# {mesh_sculpted_prim} {[Startup]physics:OpenDynamicsEngine} {Mesh sculpties so they collide as they look?} {true false} true 628 ;# {mesh_sculpted_prim} {[Startup]physics:OpenDynamicsEngine} {Mesh sculpties so they collide as they look?} {true false} true
624 ;; Do we want to mesh sculpted prim to collide like they look? 629 ;; Do we want to mesh sculpted prim to collide like they look?
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index 0be4af5..e89fa0a 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -1045,6 +1045,9 @@
1045 ; magnifications use lots of memory. 1045 ; magnifications use lots of memory.
1046 TerrainMeshMagnification = 2 1046 TerrainMeshMagnification = 2
1047 1047
1048 ; Should avatars collide with each other?
1049 AvatarToAvatarCollisionsByDefault = true
1050
1048 ; Avatar physics height adjustments. 1051 ; Avatar physics height adjustments.
1049 ; http://opensimulator.org/wiki/BulletSim#Adjusting_Avatar_Height 1052 ; http://opensimulator.org/wiki/BulletSim#Adjusting_Avatar_Height
1050 AvatarHeightLowFudge = 0 ; Adjustment at low end of height range 1053 AvatarHeightLowFudge = 0 ; Adjustment at low end of height range