Issue Details (XML | Word | Printable)

Key: LIBOMV-859
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Latif Khalifa
Reporter: Legolas Luke
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
libopenmetaverse

SimPosition reporting RelativePosition when avatar is sitting

Created: 25/Jul/10 02:53 PM   Updated: 16/Jan/12 04:11 AM
Component/s: Avatars
Affects Version/s: 0.8.2
Fix Version/s: 0.8.3

File Attachments: 1. Text File LIBOMV-859.patch (0.8 kB)
2. Text File SimPositionFix.patch (2 kB)


Severity: High
Environment: All
Steps to Reproduce: Sit on an object and observe SimPosition and anything related to it...


 Description  « Hide
When an avatar is sitting SimPosition is reporting Relative position which throws many functions off route. Attached is a patch that resolves this issue.

 All   Comments   Change History   Subversion Commits   Patches      Sort Order: Ascending order - Click to sort in descending order
Robin Cornelius added a comment - 25/Jul/10 03:33 PM
Its suspose to return a relative position because the avatar is then a child object of the prim it is sitting on. This is how the protocol on the wire works and everyone with libomv clients already does a check to see if the agent is sitting then does a offset and rotation from the parent prim. Fixing this would break any clients that want to actually see where the agent is sitting WRT the prim it is sitting on.

Latif Khalifa added a comment - 25/Jul/10 03:38 PM
We have code that traverses ParentID hirearchy to find a root prim, I can reproduce the problem, trying to figure out why ParentID doesn't seem to be populated correctly.

Legolas Luke added a comment - 25/Jul/10 03:41 PM


With all respect I have to agree to disagree with you Robin. Simposition should report the absolute position of the avatar. RelavitvePosition should report the relative postion relating to SIM as the function name suggests.Otherwise what is the point if they both behave the same???

Legolas Luke added a comment - 25/Jul/10 03:48 PM

It is failing cos the code you have is looking for the parent of the parent of the parent....etc. There can be only one parent and not multiple..no? Even if not before this certainly seems to be the case in SIM V 1.40. Sit down on an object on a V 1.40 SIM and you will see what I am referrign to...

Latif Khalifa added a comment - 25/Jul/10 03:54 PM - edited
Legolas, could you please try LIBOMV-859.patch and see if it fixes problem for you. We're trying to keep compatibility with OpenSim which does this slightly differently.

Robin Cornelius added a comment - 25/Jul/10 03:55 PM
@Legolas, good point, i retract my statment

Latif Khalifa added a comment - 25/Jul/10 04:00 PM
In OpenSim, when avatar sits on a child prim, it's parent ID is that of the child prim, so one has to go one more step back to find the root prim. There is some talk about allowing avatars to sit on attachments too.

I've tried to make a universal method, but have unfortunately missed the first step, if there is no hierarchy sigh.


Legolas Luke added a comment - 25/Jul/10 04:32 PM


Thx Latif that patch sorted the issue out and I am more than pleased we have a solution that pleases SL as well as OpenSIM. Great work guys. Ty very much