|
Zena Tiki
Registered User
Join date: 16 Nov 2006
Posts: 37
|
11-07-2007 23:20
How can I give control to an avatar to select the direction it faces when it sits on a bar stool? Has anyone got a script they could let me have J (big cheesy grin – batter my eyelids)
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
11-08-2007 05:50
The tricky bit here is that having a sat-upon object take controls can make it difficult for newer residents to control the cam: they tend to use the arrow keys to rotate the default cam location when seated, without rotating the avatar. It would certainly be possible--and I think pretty simple--to instead take those controls and use them to rotate the avatar or the avatar-and-object linkset, but I've learned that people get very uncomfortable when their cam doesn't behave as they expect.
It should be possible to use the Shift-arrow keys to rotate the avatar, and leave the regular ones to control the cam. This would be weird for folks who are accustomed to using Shift-arrows for a pan/strafe motion, but might not be as distressing as overriding the regular arrow key / cam control behavior. I've used those controls in some scripts to cycle through alternate animations while seated, so instead rotating the avatar some incremental angle in the global Z dimension would seem do-able.
|
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
11-08-2007 06:23
As long as no script is currently taking their controls with the last llTakeControls parameter set to false, they'll still be able to just use the arrow keys to cam around where they sit, or the normal camera controls. As far as actually moving them, you can use llSetLinkPrimitiveParams to move or rotate their avatar once they've sat down. Unfortunately, you can't reference their existing rotation on the fly, since we have no llGetLinkPrimitiveParams, so you'll have to go by the default sit target on their prim or whatnot.
|
|
Zena Tiki
Registered User
Join date: 16 Nov 2006
Posts: 37
|
11-08-2007 14:19
Thankyou - I think I understand - err - well actual I don't understand a bar of it - but you get a thumbs up for effort
A second thought - as the stool has a circulat seat - would it be possible to rotate the seat rather than the sitter?
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
11-08-2007 21:26
just rotate the whole stool =) av should go right along with it. and please, don't "batter" your "eyelids"... you might damage your eye, then how would you read my witty replies =) (I tease, the correct phrase, in case you're not a native english speaker, is "bat my eylashes" 
_____________________
| | . "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... | - 
|
|
Zena Tiki
Registered User
Join date: 16 Nov 2006
Posts: 37
|
11-08-2007 23:56
giggle - tanks
|