Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007069opensim[REGION] Physics Enginespublic2014-03-20 01:252014-04-05 07:16
Reportermaurizio55 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0007069: wrong sit offset
DescriptionI'm pretty sure this issue has been already reported and maybe addressed. Just wanted to make sure that there is nothing wrong in my code.
Everywhere avatars sit, the vertical offset is moved up by a certain amount, probably 60 cm. This happens even if sitting target has been set. The engine just doesn't recognize the end of the trunk on the avatar. ODE and Bulletsim, same problem.
Steps To ReproduceJust sit on any prim.
Additional InformationTried with several avatar shapes.
TagsNo tags attached.
Git Revision or version number0.7.6 release
Run Mode Standalone (Multiple Regions)
Physics EngineODE
Script Engine
EnvironmentMono / Linux64
Mono Version2.10
Viewerfirestorm + kokua
Attached Filesjpg file icon wrong_sit.jpg [^] (33,198 bytes) 2014-03-20 01:25


jpg file icon wrong_sit_OSgrid.jpg [^] (30,908 bytes) 2014-03-20 23:16


jpg file icon wrong_sit-SL.jpg [^] (46,746 bytes) 2014-03-20 23:17

- Relationships

-  Notes
(0025486)
Mata Hari (reporter)
2014-03-20 03:26

There are no fancy positioning calculations made in Opensim (or SL) when an avatar sits. All that happens is the (roughly) avi center is placed at a position that is somewhat above the center of the prim is sits on. It does not in any way take into account the size of the prim or the size of the avatar -- it makes no attempt to calculate a "collision point" of their respective surfaces. That means the spacing between the avi and the prim will change if you change the prim size (to see this, rez a large cube and sit on it...you'll be inside it, or rez a tiny cube and sit on it...you'll be much further from its surface)

Making things even less consistent, the positioning of an avi when seated is actually done based on the location of the origin location of the animation it plays (not the physical center of the avi) and this position can vary from animation to animation. The purpose of the sit target associated with a prim is to allow you to adjust/offset from that default position, but the amount of offset you'll need will depend entirely on the size of the prim, the size of the avi, and the sit animation playing. See: http://wiki.secondlife.com/wiki/LlSitTarget [^]
(0025492)
maurizio55 (reporter)
2014-03-20 09:48

Why this happens only in my installation of opensim? I saw other opensim based grids and avatars don't sit in the "air". the xengine should do a rough calculation to place the center of the avatar to match the height of the higher face of the prim, but in this case instead of the center of the avatar, the reference point is the bottom of the feet. it has to do either with the xengine or the default sit anim (btw, where is the default sitting animation defined?). I tried both ODE and Bulletsim. For sure not a viewer or avatar mesh issue.
(0025493)
nebadon (administrator)
2014-03-20 09:55

This will only happen when sitting on uscripted prims/objects if you use a basic sit position script you can force the avatars location.
(0025495)
maurizio55 (reporter)
2014-03-20 10:49

I know, of course with script you can set the relative target coordinates. I was just noticing that in other opensim builds, avatars sit "almost" right even on unscripted prims. Xengine should do it, even not totally accurate, anyway, even in absence of a sitting anim, and this is what is happening in SL and mostly all opensim based grids. Detecting the coordinates of the center of an horizontal top face in a cube prim is a 2-line code algorythm, I can't believe that xengine sits the avatar one meter in the air. It has to be with a bug in the version of xengine module I have or a wrong definition of the avatar default sitting point or center of gravity.
(0025496)
nebadon (administrator)
2014-03-20 10:55

this has nothing to do with Xengine, unscripted prims would never use Xengine for anything, this functionality has never worked correctly in OpenSimulator, if it almost worked it was only because you got lucky at the time, the problem has to do with how the Raycasting works for sit, its not functioning correctly, the only way right now to make it work correctly is to use a sit script with the exact coordinates and rotation you want, otherwise its just chance that it may work correctly from time to time.
(0025510)
maurizio55 (reporter)
2014-03-20 23:16

Sorry if I insist. I don't know which module/s are involved in positioning a sitting avatar in absence of a sitting target script. attached 2 snapshots, one from opensim and one from SL, both for AVs sitting on a brand new 0.5 0.5 0.5 cube with no animation script. the one in OS grid gets right Z and wrong X. The one in SL get almost right, just a bit too low. nothing compared with the weird position calculated in my 0.7.6 installation. The behavior is consistent, and not random.
(0025526)
maurizio55 (reporter)
2014-03-22 13:14

I will check myself the code and if I find a way to fix it I'll propose a patch
(0025684)
aleric (reporter)
2014-04-05 07:16

Argh... I just realized that my above report is incorrect :/. Sorry. I will delete it (will have deleted it by the time you read this) and create a new issue with a correct report later, because this issue (7096) is about sitting without script - so I was using the wrong issue anyway :/

- Issue History
Date Modified Username Field Change
2014-03-20 01:25 maurizio55 New Issue
2014-03-20 01:25 maurizio55 File Added: wrong_sit.jpg
2014-03-20 01:39 maurizio55 Severity major => minor
2014-03-20 03:26 Mata Hari Note Added: 0025486
2014-03-20 09:48 maurizio55 Note Added: 0025492
2014-03-20 09:55 nebadon Note Added: 0025493
2014-03-20 10:49 maurizio55 Note Added: 0025495
2014-03-20 10:55 nebadon Note Added: 0025496
2014-03-20 23:16 maurizio55 Note Added: 0025510
2014-03-20 23:16 maurizio55 File Added: wrong_sit_OSgrid.jpg
2014-03-20 23:17 maurizio55 File Added: wrong_sit-SL.jpg
2014-03-22 13:14 maurizio55 Note Added: 0025526
2014-04-04 14:43 aleric Note Added: 0025681
2014-04-04 14:48 aleric File Added: SitTarget_002.jpg
2014-04-04 14:49 aleric File Added: SitTarget_003.jpg
2014-04-04 14:56 aleric Note Edited: 0025681 View Revisions
2014-04-05 07:16 aleric Note Added: 0025684
2014-04-05 07:17 aleric Note Deleted: 0025681
2014-04-05 07:18 aleric File Deleted: SitTarget_002.jpg
2014-04-05 07:18 aleric File Deleted: SitTarget_003.jpg


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker