Add a OS_NPC_LAND_AT_TARGET option to osMoveToTarget()

Default for this function is now not to automatically land.
This allows better control by scripts when an avatar is going to be landing on a prim rather than the ground.
Stopping the avatar involves faking a collision, to avoid the pid controller making it overshoot.
A better approach would be to gradually slow the avatar as we near the target
This commit is contained in:
Justin Clark-Casey (justincc)
2011-08-10 23:56:19 +01:00
parent fb92678b83
commit 7f499ff3f3
7 changed files with 45 additions and 18 deletions

View File

@@ -71,8 +71,11 @@ namespace OpenSim.Region.Framework.Interfaces
/// If true, then the avatar will attempt to walk to the location even if it's up in the air.
/// This is to allow walking on prims.
/// </param>
/// <param name="landAtTarget">
/// If true and the avatar is flying when it reaches the target, land.
/// </param>
/// <returns>True if the operation succeeded, false if there was no such agent or the agent was not an NPC</returns>
bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly);
bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget);
/// <summary>
/// Stop the NPC's current movement.