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.0.7.6-extended
parent
7c3b71d294
commit
e8b1e91a1d
|
@ -183,7 +183,7 @@ public class BSActorAvatarMove : BSActor
|
||||||
if (m_controllingPrim.IsColliding)
|
if (m_controllingPrim.IsColliding)
|
||||||
{
|
{
|
||||||
// If we are colliding with a stationary object, presume we're standing and don't move around
|
// If we are colliding with a stationary object, presume we're standing and don't move around
|
||||||
if (!m_controllingPrim.ColliderIsMoving)
|
if (!m_controllingPrim.ColliderIsMoving && !m_controllingPrim.ColliderIsVolumeDetect)
|
||||||
{
|
{
|
||||||
m_physicsScene.DetailLog("{0},BSCharacter.MoveMotor,collidingWithStationary,zeroingMotion", m_controllingPrim.LocalID);
|
m_physicsScene.DetailLog("{0},BSCharacter.MoveMotor,collidingWithStationary,zeroingMotion", m_controllingPrim.LocalID);
|
||||||
m_controllingPrim.IsStationary = true;
|
m_controllingPrim.IsStationary = true;
|
||||||
|
|
|
@ -132,7 +132,8 @@ public abstract class BSPhysObject : PhysicsActor
|
||||||
public string PhysObjectName { get; protected set; }
|
public string PhysObjectName { get; protected set; }
|
||||||
public string TypeName { get; protected set; }
|
public string TypeName { get; protected set; }
|
||||||
|
|
||||||
// Set to 'true' when the object is completely initialized
|
// Set to 'true' when the object is completely initialized.
|
||||||
|
// This mostly prevents property updates and collisions until the object is completely here.
|
||||||
public bool IsInitialized { get; protected set; }
|
public bool IsInitialized { get; protected set; }
|
||||||
|
|
||||||
// Return the object mass without calculating it or having side effects
|
// Return the object mass without calculating it or having side effects
|
||||||
|
@ -356,6 +357,8 @@ public abstract class BSPhysObject : PhysicsActor
|
||||||
// On a collision, check the collider and remember if the last collider was moving
|
// On a collision, check the collider and remember if the last collider was moving
|
||||||
// Used to modify the standing of avatars (avatars on stationary things stand still)
|
// Used to modify the standing of avatars (avatars on stationary things stand still)
|
||||||
public bool ColliderIsMoving;
|
public bool ColliderIsMoving;
|
||||||
|
// 'true' if the last collider was a volume detect object
|
||||||
|
public bool ColliderIsVolumeDetect;
|
||||||
// Used by BSCharacter to manage standing (and not slipping)
|
// Used by BSCharacter to manage standing (and not slipping)
|
||||||
public bool IsStationary;
|
public bool IsStationary;
|
||||||
|
|
||||||
|
@ -435,6 +438,7 @@ public abstract class BSPhysObject : PhysicsActor
|
||||||
|
|
||||||
// For movement tests, remember if we are colliding with an object that is moving.
|
// For movement tests, remember if we are colliding with an object that is moving.
|
||||||
ColliderIsMoving = collidee != null ? (collidee.RawVelocity != OMV.Vector3.Zero) : false;
|
ColliderIsMoving = collidee != null ? (collidee.RawVelocity != OMV.Vector3.Zero) : false;
|
||||||
|
ColliderIsVolumeDetect = collidee != null ? (collidee.IsVolumeDetect) : false;
|
||||||
|
|
||||||
// Make a collection of the collisions that happened the last simulation tick.
|
// Make a collection of the collisions that happened the last simulation tick.
|
||||||
// This is different than the collection created for sending up to the simulator as it is cleared every tick.
|
// This is different than the collection created for sending up to the simulator as it is cleared every tick.
|
||||||
|
|
Loading…
Reference in New Issue