|Anonymous | Login | Signup for a new account||2021-12-08 20:54 PST|
|Main | My View | View Issues | Change Log | Roadmap | Summary | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0007129||opensim||[REGION] Specific OpenSim Module||public||2014-04-23 18:25||2021-11-13 18:20|
|Assigned To||Gwyneth Llewelyn|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Platform||PC||Operating System||Ubuntu||Operating System Version||14.04 LTS|
|Product Version||master (dev code)|
|Target Version||Fixed in Version|
|Summary||0007129: osNpcSit on prim does not immediately sit the avatar|
|Description||A year ago, this was reported by Rameshsharma Ramloll on the opensim-users mailing list: https://lists.berlios.de/pipermail/opensim-users/2013-April/012157.html [^]|
I just tested it under 0.8.0 Dev (latest git). When giving a osNpcMoveToTarget command towards a prim, followed by a osNpcSit command on that very same prim, the NPC will just stand beneath it. Once the NPC is not moving any longer, then osNpcSit works immediately.
Apparently sitting will only work if the NPC is not moving.
|Steps To Reproduce||I'm using a slightly modified version of the NPC manipulator adapted by justincc 0.0.3 released 20121025 (http://www.free-lsl-scripts.com/cgi/freescripts.plx?ID=569 [^]) just to do some tests.|
|Additional Information||A possible workaround is to check if the avatar is not moving before emitting the osNpcSit command. I do that by attaching an object to the NPC (which tracks more information anyway) and looking to see if the current velocity is zero, and waiting if it's not. This is a bit tricky and results might differ between ODE and BulletSim (i.e. velocity might not be _exactly_ zero when the NPC _seems_ stationary).|
|Tags||NPC, osNpcSit, sit|
|Git Revision or version number||OpenSim 0.8.0 Dev 722f030 (interface version 7)|
|Run Mode||Grid (Multiple Regions per Sim)|
|Environment||Mono / Linux64|
I have experienced a similar problem. In my case the NPC walks toward a bench to sit on it. The NPC would "sit" (triggering the proper animation), however its motion would not stop... so it would appear to drift off into space slowly.
The simple solution was to include a stopMoveTo command before having the NPC sit.
This seems to be extremely reliable and does not require any velocity detections or delay between the stop and sit commands.
osNpcStopMoveToTarget( npc );
osNpcSit(npc, theBench, OS_NPC_SIT_NOW);
Gwyneth Llewelyn (reporter)
|I'll accept this as 'fixed', or, rather, assume that the workaround proposed by @dz is the correct, idiomatic way of dealing with the issue. In a weird sort of way, it even makes sense: iRL, if you're still moving around, attempting to jump in the air to land on a bench sitting down (without falling over...) is no mean feat — very likely you'll land on the ground instead. So why should OpenSimulator be different? After all, that's exactly what seems to happen — the NPC's avatar fails to sit on the bench while moving, and either remains standing or sits on the ground next to the bench. So, it's much more rational to expect that NPCs have to stop moving first before attempting to sit down, then to automatically assume that there is something inherently wrong in the OpenSimulator code...|
|2014-04-23 18:25||Gwyneth Llewelyn||New Issue|
|2014-04-23 18:26||Gwyneth Llewelyn||Tag Attached: NPC|
|2014-04-23 18:26||Gwyneth Llewelyn||Tag Attached: sit|
|2014-04-23 18:26||Gwyneth Llewelyn||Tag Attached: osNpcSit|
|2014-12-11 06:24||dz||Note Added: 0027086|
|2021-11-13 18:20||Gwyneth Llewelyn||Mono Version||3.2 => 6.x|
|2021-11-13 18:20||Gwyneth Llewelyn||Note Added: 0038225|
|2021-11-13 18:20||Gwyneth Llewelyn||Status||new => resolved|
|2021-11-13 18:20||Gwyneth Llewelyn||Resolution||open => fixed|
|2021-11-13 18:20||Gwyneth Llewelyn||Assigned To||=> Gwyneth Llewelyn|
|Copyright © 2000 - 2012 MantisBT Group|