Also preserve angular velocity on crossing.

avinationmerge
Melanie 2012-02-21 10:10:04 +01:00
parent 03e7bc1526
commit 0e4d5a4d3c
1 changed files with 3 additions and 0 deletions

View File

@ -1540,6 +1540,7 @@ namespace OpenSim.Region.Framework.Scenes
if (!isPhantom && !ParentGroup.IsAttachment && !(Shape.PathCurve == (byte)Extrusion.Flexible)) if (!isPhantom && !ParentGroup.IsAttachment && !(Shape.PathCurve == (byte)Extrusion.Flexible))
{ {
Vector3 velocity = Velocity; Vector3 velocity = Velocity;
Vector3 rotationalVelocity = AngularVelocity;
try try
{ {
PhysActor = ParentGroup.Scene.PhysicsScene.AddPrimShape( PhysActor = ParentGroup.Scene.PhysicsScene.AddPrimShape(
@ -1572,7 +1573,9 @@ namespace OpenSim.Region.Framework.Scenes
PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0); PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0);
Velocity = velocity; Velocity = velocity;
AngularVelocity = rotationalVelocity;
PhysActor.Velocity = velocity; PhysActor.Velocity = velocity;
PhysActor.RotationalVelocity = rotationalVelocity;
if (!building) if (!building)
PhysActor.Building = false; PhysActor.Building = false;