Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008250opensim[REGION] OpenSim Corepublic2017-10-16 22:002020-05-20 12:52
Assigned ToLotek 
Statuspatch includedResolutionfixed 
PlatformLinuxOSUbuntuOS Version16.04LTS
Product Versionmaster (dev code) 
Target VersionFixed in Versionmaster (dev code) 
Summary0008250: llMoveToTarget() in attachment plays 'landing' anim when on a prim floor
DescriptionWhen wearing an attachment that uses llMoveToTarget() to move the avi towards an object or person, the 'landing' animation is briefly played in the beginning instead of walking all the way.

This only happens when standing on a prim surface/floor, the bug doesn't happen on terrain.

Attached patch fixes this
Steps To ReproduceTo show the problem, put this script in a prim, wear it, then click it.
Don't forget to set g_kTarget to a prim or other avatar UUID that is nearby.

key g_kTarget = "9aa5cd4f-27e3-4b92-8f5a-1084093855d5"; // can be an object or avi uuid

    touch_end(integer num_detected)
        if (llDetectedKey(0)!=llGetOwner()) return;
        if (llGetAttached()==0) return;
        vector v = llList2Vector(llGetObjectDetails(g_kTarget, [OBJECT_POS]), 0);
        llMoveToTarget(v, 0.44);
Additional InformationBug manifests in 0.8 and 0.9, on BulletSim and ubODE

This bug has always been very noticable/annoying to OpenCollar users on OpenSim (when the Leash is being used)
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (1 Region per Sim)
Physics EngineBulletSim
Script Engine
EnvironmentMono / Linux64
Mono VersionOther
Attached Files? file icon workaround.lsl [^] (2,773 bytes) 2017-12-14 05:06
patch file icon 0001-Mantis-8250-Don-t-start-flying-when-we-re-supposed-t.patch [^] (1,009 bytes) 2018-11-02 12:59 [Show Content]
patch file icon 0001-Add-osMoveToTarget.patch [^] (7,948 bytes) 2018-12-08 02:05 [Show Content]

- Relationships

-  Notes
UbitUmarov (administrator)
2017-12-12 17:14

Sorry issue cause seems to be multithreading timing issues.
avatar is told to fly but that is canceled by viewers, before they are told it is moving, so resulting on a fall, and no fly at all (timing dependent).
at least its what it seems to me
Added some code changes to master.. lets see how it works
Lotek (reporter)
2017-12-13 03:05

The change in mantis makes the previous behaviour worse.

The following avi is now stationary showing the fly pose and not following the other person at all (should be walking towards the other person or object).

One minute later the following avi had a hard viewer crash, first a black viewer screen and then crash. No warning or errors on the region console apart from 'No packets received from root agent Lotek Ixtar. Disconnecting'.

I'm reverting to my own change/patch for now which solved the problem
gimisa (reporter)
2017-12-13 05:05

I did a hand to hand walk avatar follower. As work around , in order to prevent it from flying in 090 I set the Z height to 0.5. Using that hack its possible to walk on bad terrain without flying with both avatar hand in hand more or less . for script and details .

Hope that helps
UbitUmarov (administrator)
2017-12-13 07:55

i did my test with you script and with a simple prim target.
UbitUmarov (administrator)
2017-12-13 21:14

after you visit to my region, i made a few checks...
a) our llMoveToTarget is not as sl, at least for avatars. It does not use tau and more important, does not trigget at_target, and stops automaticly on arriving to target. Sl does trigger that event, and stays active until stop is called.
b) checking a few scripts like a avatar follow one, noticed that they change state or reset on any changed event. Happens that we have no standard events, in particular CHANGED_ANIMATION, (guess added ages ago because of some AO controlers)
this is of course triggered during movement changes, so this scripts reset/stop.
guess that was the issue with your collar thingy.

c) at least ubOde does not like avatar overlaps, some hug scripts do try to force it (moving one to the position of the other), ubode will react moving one or both. So scripts need to avoid that ( don't remember what bullet does..)

a work around is changing:
    changed(integer change) {
    changed(integer change) {
        if(change & 0xfff != 0)

or mask events that do matter

this diferences make some SL scripts (or tricks) to fail
i could change at least some of this, but they are old, and i have no clear idea about the negative impact of changes on current scripts :(
sugestions may be accepted :p
BillBlight (developer)
2017-12-13 22:36
edited on: 2017-12-13 22:40

My suggestion would be to not even really try to fix it , but add

osAvatarMoveTo , osAvatarMoveToTarget, osAvatarRotate, osAvatarLookAt and osAvatarStopMoveToTarget, as well as all the options the same as the NPC functions. These functions seem to work well. That is just my .02

Lotek (reporter)
2017-12-14 05:21

Hi, I took notice of what Ubit said and have attached an idea that will work in all 3 cases

With the old situation (before this report) it follows, but still the 'landing' animation as reported in this bug
With Ubit's new changes in master, it follows and plays a correct walking animation
With my previously attached patch, it also follows and plays a correct walking animation

Basically I emulate a lightweight not_at_target within at_target by comparing the distance between current and target vectors
Lotek (reporter)
2017-12-14 06:26

Sorry it still plays flying/landing in master.

Strange the avi walked normally (following) in Ubits region but in a fresh new region running master it is bad again.
UbitUmarov (administrator)
2017-12-14 08:27

sorry no.. the thing is on the decision fly/nofly code.
you have a short avatar.. current code will make you fly huging a normal one lik e mine :p
UbitUmarov (administrator)
2017-12-14 11:33

oops at_target events are not triggered by movetotarget alone, i was wrong above..
Lotek (reporter)
2018-08-22 07:24

I can't repro this anymore in Sandbox Plaza except in the border case when walking a leashed person wearing a collar on and off a ramp prim. Sandbox Plaza is running OpenSim Dev 24df1086fa: 2018-05-04 23:00:34 +0100 (Unix/Mono) at this time of writing.

Feel free to re-open this bug if this is still an issue on master.
Lotek (reporter)
2018-11-02 12:59

People still have problems with this issue on master and release so it never got resolved.

Will include up to date patch now that some grids and people use sucessfully on their sims.
unregi (reporter)
2018-12-07 22:57

The issue appears for us when walking on a prim, like in a house or skybox, it doesn't even have to be a ramp. The following/leashed Avatar will be flying and be dragged like a balloon.

The attached patch would force every MoveToTarget that is not set to land on target to not fly. This would afaik break osNpcMoveToTarget with OS_NPC_LAND_AT_TARGET and OS_NPC_FLY.

In SL, the Avatar is flying as soon as he is not touching the ground or a prim on the path, while this is better than OS, it still makes the Avatar fly in some situations where he could just walk.

I agree with BillBlight that implementing osMoveToTarget with the options that osNpcMoveToTarget has would be nice. Then the script can decide what kind of movement it wants, a simple Avatar follower i.e. could check if target Avatar is AGENT_FLYING, and let the Avatar fly just if the target Avatar is also flying.
unregi (reporter)
2018-12-08 02:11

Added patch that is implementing a new function osMoveToTarget with ThreadLevel.Low and activated by default.
It is like llMoveToTarget (including tau) but takes additionally OS_LAND_AT_TARGET, OS_FLY and OS_NO_FLY options that are equivalent to osNpcMoveToTarget.
I named it osMoveToTarget and not osAvatarMoveToTarget, because it still works with physical prims like llMoveToTarget.
UbitUmarov (administrator)
2018-12-08 08:40

Outch, that reminds me I do have some changes on avatar move to target getting dust on my disk.
 I will try to review that and this patchs

btw both sl and us try to implement a crude decision method to reach target, where allowed, fly is option we all consider when we are in control.
this was made just simple not a true path finding algorithm
UbitUmarov (administrator)
2020-05-19 09:03

made a few more changes.
still no new ossl
UbitUmarov (administrator)
2020-05-19 13:53

made some more changes

regions have no control of viewers fly state
so the options would not work.
those are there for NPCs, that have no viewer
gimisa (reporter)
2020-05-20 12:52
edited on: 2020-05-20 12:55

I had samme problem with version 090 with llmove2target and wrote a work around the situation in my technical page about it .

Search for this from my technical page about it:
OPENSIM version 090 llMove2Target,

ref: [^]

To my knowledge it was corrected with 0911.

- Issue History
Date Modified Username Field Change
2017-10-16 22:00 Lotek New Issue
2017-10-16 22:00 Lotek File Added: fixmovetotarget.diff
2017-12-12 17:14 UbitUmarov Note Added: 0032466
2017-12-13 03:05 Lotek Note Added: 0032468
2017-12-13 05:05 gimisa Note Added: 0032469
2017-12-13 07:55 UbitUmarov Note Added: 0032470
2017-12-13 21:14 UbitUmarov Note Added: 0032471
2017-12-13 22:36 BillBlight Note Added: 0032472
2017-12-13 22:40 BillBlight Note Edited: 0032472 View Revisions
2017-12-13 22:40 BillBlight Note Edited: 0032472 View Revisions
2017-12-14 05:06 Lotek File Added: workaround.lsl
2017-12-14 05:21 Lotek Note Added: 0032473
2017-12-14 06:26 Lotek Note Added: 0032474
2017-12-14 08:27 UbitUmarov Note Added: 0032475
2017-12-14 11:33 UbitUmarov Note Added: 0032476
2018-08-22 07:24 Lotek Note Added: 0032870
2018-08-22 07:24 Lotek Status new => resolved
2018-08-22 07:24 Lotek Fixed in Version => master (dev code)
2018-08-22 07:24 Lotek Resolution open => fixed
2018-08-22 07:24 Lotek Assigned To => Lotek
2018-11-02 12:59 Lotek Note Added: 0033392
2018-11-02 12:59 Lotek Status resolved => patch included
2018-11-02 12:59 Lotek File Deleted: fixmovetotarget.diff
2018-11-02 12:59 Lotek File Added: 0001-Mantis-8250-Don-t-start-flying-when-we-re-supposed-t.patch
2018-12-07 22:57 unregi Note Added: 0033576
2018-12-08 02:05 unregi File Added: 0001-Add-osMoveToTarget.patch
2018-12-08 02:11 unregi Note Added: 0033578
2018-12-08 08:40 UbitUmarov Note Added: 0033579
2020-05-19 09:03 UbitUmarov Note Added: 0036482
2020-05-19 13:53 UbitUmarov Note Added: 0036483
2020-05-20 12:52 gimisa Note Added: 0036485
2020-05-20 12:55 gimisa Note Edited: 0036485 View Revisions

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker