Sit Script Rotation
|
|
Zapoteth Zaius
Is back
Join date: 14 Feb 2004
Posts: 5,634
|
03-12-2006 12:41
Hi Guys Am building furniture, trying to put in basic sit scripts without having to add sit prims (e.g. prims with no rotation).
Was wondering if its possible, and if anyone has a sit script that allows for roation as well as offset? Would be very usefull!
Thanks!
_____________________
I have the right to remain silent. Anything I say will be misquoted and used against me.--------------- Zapoteth Designs, Temotu (100,50)--------------- 
|
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
03-12-2006 13:06
Well, the basic function llSitTarget has a rotation parameter as well as a vector one. I'm not sure quite what you're asking here...
|
|
Zapoteth Zaius
Is back
Join date: 14 Feb 2004
Posts: 5,634
|
03-12-2006 13:17
From: Ordinal Malaprop Well, the basic function llSitTarget has a rotation parameter as well as a vector one. I'm not sure quite what you're asking here... Sorry, while the script has one, in all the scripts, its set to ZERO_ROTATION, and I'm not sure how to use it.. So was wondering if anyone had a script with the rotation parameter active?
_____________________
I have the right to remain silent. Anything I say will be misquoted and used against me.--------------- Zapoteth Designs, Temotu (100,50)--------------- 
|
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
03-12-2006 13:22
Well, if you know the rotation you want to set the sitter to, you just replace ZERO_ROTATION with that rotation.
Sorry, I may just be being a bit dim here, I'm still a bit lost. What exactly is it you're trying to do?
|
|
Zapoteth Zaius
Is back
Join date: 14 Feb 2004
Posts: 5,634
|
03-12-2006 13:28
From: Ordinal Malaprop Well, if you know the rotation you want to set the sitter to, you just replace ZERO_ROTATION with that rotation.
Sorry, I may just be being a bit dim here, I'm still a bit lost. What exactly is it you're trying to do? I've got a sofa/couch which doesn't have any prims that are suitable to sit on, without rotating the avatar. So I need the sit script to rotate the avatar round, to sit right on the sofa. But changing.. llSitTarget(<0,0,.1>, ZERO_ROTATION); to llSitTarget(<0,0,.1>, <0,0,.1>  ; Didn't work (thus is my scripting knowledge, I'm the dim one  ) I'm just not sure what I should replace ZERO_ROTATION with to tell it what degrees of rotation I need. Thanks for your help The worst non-scripter in SL
_____________________
I have the right to remain silent. Anything I say will be misquoted and used against me.--------------- Zapoteth Designs, Temotu (100,50)--------------- 
|
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
03-12-2006 13:33
Ah. Right. Well, rotations aren't vectors, they're quaternions, which are... oh, you really don't want to go there. I don't want to go there. I hate rotations.
Probably the best idea is if you use the llEuler2Rot function, which makes it a lot simpler to spin someone around a particular axis. Say if you set the rotation to llEuler2Rot(0.0, 0.0, PI_BY_TWO) instead of ZERO_ROTATION - that would rotate the sitter by PI/2 (90 degrees) around the Z-axis. If you play with that you'll get it right eventually.
|
|
Logan Bauer
Inept Adept
Join date: 13 Jun 2004
Posts: 2,237
|
03-12-2006 13:36
Hmm, now I know at least one person had made a nice sit offset position/rotation finder script, but I never got a copy myself and can't find the thread it's mentioned in... Zap, try creating a cube and putting this script in it:
default {
touch_start(integer total_number) { llOwnerSay((string)llGetRot()); } }
Then, rotate the cube 45 degrees right and click, and it will give you the rotation for 45 degrees right from zero_rotation... Ect... Play around with that a bit and you should be able to get the rotation offset figured out if you've already understand enough to get the offset positions hammered out... I.E if you sit in the furniture and with an offset of ZERO_ROTATION your AV is facing 90 degrees to the right, turn the block with your rotation-saying script 90 degrees left of a 0,0,0 rotation, click it, and then put the rotation it says in your furniture.
|