change to llTargetOmega. If gain == 0 make viewer stop and reset rotation. NOT AS SL (but as its spec) - MAY DEPEND ON VIEWER. as before on physical only works on rootprim, ignored on child ones

This commit is contained in:
UbitUmarov
2021-10-26 23:08:01 +01:00
parent 162454bdc0
commit 8c16034bef

View File

@@ -4229,11 +4229,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
protected void TargetOmega(SceneObjectPart part, LSL_Vector axis, double spinrate, double gain)
{
PhysicsActor pa = part.PhysActor;
if ( ( pa == null || !pa.IsPhysical ) && gain == 0.0d )
spinrate = 0.0d;
part.UpdateAngularVelocity(axis * spinrate);
}
if(gain == 0)
{
part.UpdateAngularVelocity(Vector3.Zero);
part.ScheduleFullAnimUpdate();
}
else
part.UpdateAngularVelocity(axis * spinrate);
}
public LSL_Integer llGetStartParameter()
{