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))
{
Vector3 velocity = Velocity;
Vector3 rotationalVelocity = AngularVelocity;
try
{
PhysActor = ParentGroup.Scene.PhysicsScene.AddPrimShape(
@ -1572,7 +1573,9 @@ namespace OpenSim.Region.Framework.Scenes
PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0);
Velocity = velocity;
AngularVelocity = rotationalVelocity;
PhysActor.Velocity = velocity;
PhysActor.RotationalVelocity = rotationalVelocity;
if (!building)
PhysActor.Building = false;