mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user