Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

True rotation of seated avatar in mouselook

Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
12-31-2008 13:00
I realized that when an agent is in mouselook, all rotations indicate the direction the camera is looking. When the avatar is standing, this is no big deal because you can pitch the orientation down to horizontal to get the actual orientation of the avatar (where the avatar's bounding box/cylinder is).

But what about when the avatar is sitting? I believe there's no such helpful constraint that the avatar (bouding volume) be "horizontal". Experimentation shows that llGetRot() from an attachment and llGetObjectDetails() still show the mouselook camera direction, not the orientation of the actual avatar (as more or less set by the sit target). Anyone have any idea if and how you might go about getting the actual AVATAR, not CAMERA orientation for an avatar sitting and in mouselook?

I am primarily interested in doing this from a third-party object, by the way, NOT the object being sat upon, and preferably NOT from an attachment on the avatar in question either. Hopefully something that can be used for sensing/gaming systems (roleplaying, radar HUDs, etc.). If the answer is that it can't be done, let's figure that out. Maybe we can create a feature request JIRA. If it can be done from an attachment or the object being sat upon let's explore that too, but it's not the primary focus.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
12-31-2008 17:38
I would imagine the only way to know the actual position of a sitting av is from the sit target, which can't even be read from the prim it's set on (unless you memorized the setting via script).

you MIGHT be able to make an educated guess by firing projectiles around the av position, and seeing where they make contact (and what with). though you might have trouble assuming which end of the av is 'up' (though it's usually a safe bet that it's the end not masked by an object). I suppose if you requested cam permissions you'd know which end is the head (since it'd be offset in that direction).
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -