diff options
author | UbitUmarov | 2012-05-19 00:17:37 +0100 |
---|---|---|
committer | UbitUmarov | 2012-05-19 00:17:37 +0100 |
commit | a7ece8c688a44c0d0b05162dbb1e98a1ea4e95ff (patch) | |
tree | 2a35bca621caa62a5e9d514d1711df57f0f03bac /OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs | |
parent | removed redundant colision sounds. Temporary muted sounds ( returns at top o... (diff) | |
download | opensim-SC_OLD-a7ece8c688a44c0d0b05162dbb1e98a1ea4e95ff.zip opensim-SC_OLD-a7ece8c688a44c0d0b05162dbb1e98a1ea4e95ff.tar.gz opensim-SC_OLD-a7ece8c688a44c0d0b05162dbb1e98a1ea4e95ff.tar.bz2 opensim-SC_OLD-a7ece8c688a44c0d0b05162dbb1e98a1ea4e95ff.tar.xz |
add colliders relative velocity projected in collision direction to collisions report information.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs index ddfdea4..11638d7 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs | |||
@@ -1064,7 +1064,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1064 | obj2LocalID = 0; | 1064 | obj2LocalID = 0; |
1065 | bool p1events = p1.SubscribedEvents(); | 1065 | bool p1events = p1.SubscribedEvents(); |
1066 | bool p2events = p2.SubscribedEvents(); | 1066 | bool p2events = p2.SubscribedEvents(); |
1067 | 1067 | ||
1068 | if (p1.IsVolumeDtc) | 1068 | if (p1.IsVolumeDtc) |
1069 | p2events = false; | 1069 | p2events = false; |
1070 | if (p2.IsVolumeDtc) | 1070 | if (p2.IsVolumeDtc) |
@@ -1073,6 +1073,15 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1073 | if (!(p2events || p1events)) | 1073 | if (!(p2events || p1events)) |
1074 | return; | 1074 | return; |
1075 | 1075 | ||
1076 | Vector3 vel = Vector3.Zero; | ||
1077 | if (p2 != null && p2.IsPhysical) | ||
1078 | vel = p2.Velocity; | ||
1079 | |||
1080 | if (p1 != null && p1.IsPhysical) | ||
1081 | vel -= p1.Velocity; | ||
1082 | |||
1083 | contact.RelativeSpeed = Vector3.Dot(vel, contact.SurfaceNormal); | ||
1084 | |||
1076 | switch ((ActorTypes)p1.PhysicsActorType) | 1085 | switch ((ActorTypes)p1.PhysicsActorType) |
1077 | { | 1086 | { |
1078 | case ActorTypes.Agent: | 1087 | case ActorTypes.Agent: |