* Adds llMoveToTarget and llStopMoveToTarget support to the ODEPlugin.

* It doesn't generate at_target events, because they don't exist yet in the script engine.
* The Tau is different, however, compatible with scripts I tested.
* Not perfect...  but pretty good.
This commit is contained in:
Teravus Ovares
2008-03-25 03:36:31 +00:00
parent a2daccad5e
commit a21112ccee
10 changed files with 193 additions and 6 deletions

View File

@@ -694,6 +694,25 @@ namespace OpenSim.Region.Environment.Scenes
}
}
public void moveToTarget(LLVector3 target, float tau)
{
SceneObjectPart rootpart = m_rootPart;
if (rootpart != null)
{
rootpart.PhysActor.PIDTarget = new PhysicsVector(target.X, target.Y, target.Z);
rootpart.PhysActor.PIDTau = tau;
rootpart.PhysActor.PIDActive = true;
}
}
public void stopMoveToTarget()
{
SceneObjectPart rootpart = m_rootPart;
if (rootpart != null)
{
rootpart.PhysActor.PIDActive = false;
}
}
public void SetRootPartOwner(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID)
{
part.LastOwnerID = part.OwnerID;
@@ -2019,5 +2038,7 @@ namespace OpenSim.Region.Environment.Scenes
}
}
}
}
}