Looking for rocking chair script
|
dragonfly Olsen
Registered User
Join date: 4 Jun 2004
Posts: 181
|
11-13-2004 12:02
I am looking for a script that would make a chair rock back and forth. Does anyone have one?
|
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
|
11-13-2004 15:42
Huh... realistic rocking-chair motion would actually be kinda tricky to implement, I think. I'm gonna hafta puzzle over this, 'cause now it's stuck in my brain. 
_____________________
- Making everyone's day just a little more surreal -
Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
|
Kurt Zidane
Just Human
Join date: 1 Apr 2004
Posts: 636
|
11-13-2004 17:25
shouldn't it just be a tube, cut in 1/2, with a dead wight that changes position? Or two dead wights that change their wight.
|
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
|
11-13-2004 19:21
Oh! Heh, I forgot about physics, there.  I was trying to figure out how to do it non-physically. 
_____________________
- Making everyone's day just a little more surreal -
Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
|
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
|
11-13-2004 22:06
My first ever script in SL was a non-physical rocker. It was a poor example of scripting, since I wasn't aware of the various resource drains at the time. I'd post it if I weren't embarrassed about that fact... and that I'm not in-world right now.
But the script resides in an invisible prim along the rotation axis and on the ground at the contact point. It goes something like:
--get the position and rotation (in case the owner spins the chair to a new angle) --set a timer for 0.5 second in the timer event: --subtract (amount of rot) from the rotation variable //go back a step --setrot --add (amount of rot) to the variable //go forward to the init pos --set rot --add (amount of rot) to the variable //go forward again a step --setrot --subtract (amount of rot) //go back to the init pos --set rot
loops until something kills the timer
It didn't produce a totally smooth effect, but it did a nice job simulating something like a rocking chair.
|
Issarlk Chatnoir
Cross L. apologist.
Join date: 3 Oct 2004
Posts: 424
|
11-16-2004 04:32
I have seen hamocs that seem to use the non-physical way of doing things. And it looked ugly because it wasn't smooth at all. But these were done by "people who know what they're doing" or so I think, so this suggests a physical rocking hamoc or chair must not be easy to do.
_____________________
Vincit omnia Chaos From: Flugelhorn McHenry Anyway, ignore me, just listen to the cow
|
MSo Lambert
Registered User
Join date: 16 Aug 2004
Posts: 101
|
11-16-2004 08:27
I've done a few non-physical rocking chairs and hammocks and yes, it either looks ugly (not smooth) or is a huge resource drain, too much for a simple chair. Physical way of doing this is a pain, because physics at the present state can get pretty unpredictable, especially if the server is having hickups.
But I finally got around and tried to make a hammock script that uses physics for swinging and the end results look amazing when compared to non-physical movement, although you need to do some checking from time to time and reset the whole thing (position, physics) if things get out of control for any reason.
_____________________
MSo
|
Tito Gomez
Mi Vida Loca
Join date: 1 Aug 2004
Posts: 921
|
11-16-2004 14:45
I have a rocking chair that does a pretty good job at, well, rocking!
I doubt if I can peek inside the script, but at least I can tell you who the creator is so he/she can assist you.
I'll IM you the info when I get home tonight.
- Tito
|
Buck Weaver
Unsolicited Onterator
Join date: 18 May 2003
Posts: 251
|
11-16-2004 18:54
There is a rocking chair for sale at Joan's Marina (Kissling 225,159) for a mere L$30.00.
_____________________
My karma ran over your dogma.
Thoughts become things.
|