BulletSim: add check in avatar stair step code to verify the collision
is not with a volume detect object. This fixes a problem of avatars trying to step over a volume detect object that they collide with. This appeared as the avatar popping up as it started to step up but then continuing on since the object wasn't physically interacting.0.7.6-extended
parent
377fe63c60
commit
2c31fe4614
|
@ -310,6 +310,11 @@ public class BSActorAvatarMove : BSActor
|
||||||
{
|
{
|
||||||
// Don't care about collisions with the terrain
|
// Don't care about collisions with the terrain
|
||||||
if (kvp.Key > m_physicsScene.TerrainManager.HighestTerrainID)
|
if (kvp.Key > m_physicsScene.TerrainManager.HighestTerrainID)
|
||||||
|
{
|
||||||
|
BSPhysObject collisionObject;
|
||||||
|
if (m_physicsScene.PhysObjects.TryGetValue(kvp.Key, out collisionObject))
|
||||||
|
{
|
||||||
|
if (!collisionObject.IsVolumeDetect)
|
||||||
{
|
{
|
||||||
OMV.Vector3 touchPosition = kvp.Value.Position;
|
OMV.Vector3 touchPosition = kvp.Value.Position;
|
||||||
m_physicsScene.DetailLog("{0},BSCharacter.WalkUpStairs,min={1},max={2},touch={3}",
|
m_physicsScene.DetailLog("{0},BSCharacter.WalkUpStairs,min={1},max={2},touch={3}",
|
||||||
|
@ -330,6 +335,8 @@ public class BSActorAvatarMove : BSActor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
m_walkingUpStairs = 0;
|
m_walkingUpStairs = 0;
|
||||||
// If there is a good step sensing, move the avatar over the step.
|
// If there is a good step sensing, move the avatar over the step.
|
||||||
if (highestTouchPosition != OMV.Vector3.Zero)
|
if (highestTouchPosition != OMV.Vector3.Zero)
|
||||||
|
|
|
@ -404,6 +404,7 @@ public sealed class BSCharacter : BSPhysObject
|
||||||
|
|
||||||
// Allows the detection of collisions with inherently non-physical prims. see llVolumeDetect for more
|
// Allows the detection of collisions with inherently non-physical prims. see llVolumeDetect for more
|
||||||
public override void SetVolumeDetect(int param) { return; }
|
public override void SetVolumeDetect(int param) { return; }
|
||||||
|
public override bool IsVolumeDetect { get { return false; } }
|
||||||
|
|
||||||
public override OMV.Vector3 GeometricCenter { get { return OMV.Vector3.Zero; } }
|
public override OMV.Vector3 GeometricCenter { get { return OMV.Vector3.Zero; } }
|
||||||
public override OMV.Vector3 CenterOfMass { get { return OMV.Vector3.Zero; } }
|
public override OMV.Vector3 CenterOfMass { get { return OMV.Vector3.Zero; } }
|
||||||
|
|
|
@ -175,6 +175,7 @@ public abstract class BSPhysObject : PhysicsActor
|
||||||
public abstract bool IsSolid { get; }
|
public abstract bool IsSolid { get; }
|
||||||
public abstract bool IsStatic { get; }
|
public abstract bool IsStatic { get; }
|
||||||
public abstract bool IsSelected { get; }
|
public abstract bool IsSelected { get; }
|
||||||
|
public abstract bool IsVolumeDetect { get; }
|
||||||
|
|
||||||
// Materialness
|
// Materialness
|
||||||
public MaterialAttributes.Material Material { get; private set; }
|
public MaterialAttributes.Material Material { get; private set; }
|
||||||
|
|
|
@ -617,6 +617,10 @@ public class BSPrim : BSPhysObject
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
public override bool IsVolumeDetect
|
||||||
|
{
|
||||||
|
get { return _isVolumeDetect; }
|
||||||
|
}
|
||||||
public override void SetMaterial(int material)
|
public override void SetMaterial(int material)
|
||||||
{
|
{
|
||||||
base.SetMaterial(material);
|
base.SetMaterial(material);
|
||||||
|
|
Loading…
Reference in New Issue