|
Okiphia Rayna
DemonEye Benefactor
Join date: 22 Sep 2007
Posts: 2,103
|
11-12-2007 14:03
I'll admit it anytime someone asks, I'm not scripter.. I build, thats about it... so here I am on a job that requires a super basic script and... I fail lol
Its just a basic poseball/ sit script.... I have the pose and position right and everything, but i need to rotate the sitting av as well. I tried the LSL wiki and got lost.... and I've asked inworld twice but people don't seem to understand what I mean...
Can anyone help me out?
_____________________
Owner of DemonEye Designs Custom Building and Landscaping Owner and Blogger, Okiphia's Life http://okiphiablog.blogspot.com/ 
|
|
Viktoria Dovgal
…
Join date: 29 Jul 2007
Posts: 3,593
|
11-12-2007 14:44
Rotation could mean a few things there. When you set your llSitTarget, you can set the angle for the avatar's initial position. Or, if you put the avatar on a moving prim, the avatar can go along for the ride. Or, you can use an animation to cause the avatar to move on its own once seated. Which of these describes what you want to do?
|
|
Okiphia Rayna
DemonEye Benefactor
Join date: 22 Sep 2007
Posts: 2,103
|
11-12-2007 14:55
From: Viktoria Dovgal Rotation could mean a few things there. When you set your llSitTarget, you can set the angle for the avatar's initial position. Or, if you put the avatar on a moving prim, the avatar can go along for the ride. Or, you can use an animation to cause the avatar to move on its own once seated. Which of these describes what you want to do? Set the avatars angle one time... here's my situation: To save prims on a lecture hall, I'm attempting to have tea tables that if you 'sit' on them, you will end up behind them on the floor. Only problem is these one-prim tables are rotated so that you end up face down. I just need it so that you're oriented correctly ^^
_____________________
Owner of DemonEye Designs Custom Building and Landscaping Owner and Blogger, Okiphia's Life http://okiphiablog.blogspot.com/ 
|
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
11-12-2007 15:03
The rotation of the sitting av is controlled by the llSitTarget call in the script. You should have something in it along the lines of: llSitTarget(V, R); where V is a vector of some sort (indicating where, in relation to the object, the av actually sits) and R is a rotation. What you need to do is change R. Exactly _what_ to change R to is the point mind you. I would suggest that you experiment with the llEuler2Rot function, that would probably be easiest. llEuler2Rot(<x,y,z>  returns a value for a rotation x radians around the object's X-axis, y around its Y-axis and z around its Z-axis. So, if someone is ending up facing the floor when you have llSitTarget(V, ZERO_ROTATION), probably what you want is to have it being llSitTarget(V, llEuler2Rot(<-PI_BY_TWO, 0.0, 0.0>  ). (I _think_ - don't quote me on that - it will depend on the exact rotation of the object and the existing script. But if you play with the values it should work. Remember that PI in radians is 180 degrees.)
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!
http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal
http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
|
|
Okiphia Rayna
DemonEye Benefactor
Join date: 22 Sep 2007
Posts: 2,103
|
11-12-2007 15:08
Thank you very much ^^ I'll shove that in there in a bit and see if it works, if not I get to play around with things I dont really understand ^^ Thats always fun =P
thanks again!
_____________________
Owner of DemonEye Designs Custom Building and Landscaping Owner and Blogger, Okiphia's Life http://okiphiablog.blogspot.com/ 
|
|
Okiphia Rayna
DemonEye Benefactor
Join date: 22 Sep 2007
Posts: 2,103
|
11-13-2007 19:00
Thank you so much! Worked perfect with a little change to it ^^
Had to change the rotation axis to Y, then just had to readjust positioning ^^
you are my hero!!!1
_____________________
Owner of DemonEye Designs Custom Building and Landscaping Owner and Blogger, Okiphia's Life http://okiphiablog.blogspot.com/ 
|