Mine Sapeur
Registered User
Join date: 27 Mar 2005
Posts: 5
|
05-24-2005 17:00
Is there a script that can make a porch swing go back and forth?
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
05-24-2005 17:08
You could accomplish it with physical hinges, and a timed impulse added on to it.
|
Zindorf Yossarian
Master of Disaster
Join date: 9 Mar 2004
Posts: 160
|
05-25-2005 05:43
Are you quite serious about hinges? Those things are are the #1 most buggy thing in SL. Rather than using those, use a rotational impulse. I havn't used them much, but I think you should be able to get the desired effect with them.
_____________________
Badass Ninja Penguin: Killing stuff it doesn't like since sometime in May 2004.
|
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
05-25-2005 10:26
From: Zindorf Yossarian Are you quite serious about hinges? Those things are are the #1 most buggy thing in SL. Rather than using those, use a rotational impulse. I havn't used them much, but I think you should be able to get the desired effect with them. I agree with you about the hinges, joints aren't a very viable solution unless you're willing to deal with resetting it every so often. I disagree with the rotational impulse suggestion though; the impulse would be disturbed when someone sat on the swing. Instead, make a bar at the top of the swing, where the swing's supposed to rotate around, and make that bar the parent object of the swing. Then, use llRotLookAt to rotate the bar to the desired forward and backward rotations. =============== <-- Bar | | | | | | | | | | | | | | | _____________ / seat / /_____________/
==Chris
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
05-25-2005 11:13
Yes, I believe that that would work very well. Make the bar or something where it is the root prim of the object, and then use the rotational look at function. Please forget what I said about hinges 
|
Moriash Moreau
Registered User
Join date: 1 Jan 2005
Posts: 39
|
05-25-2005 17:09
Well, I've been trying this, and I think either I am missing something or llRotLookAt won't work for this application. Near as I can tell, the Strength and Tau settings do nothing when llRotLookAt is used with a non-physical object. I've tried both settings in various combinations, with values between 0.0001 and 10000 (arbitrary numbers- I started with llGetMass/2 and llGetMass/20 as recommended in the wiki). No matter the settings, the swing moves at the same whiplash inducing speed. And if it's physical, we're still left with the problem of a stationary anchorpoint/hinge to hold the swing up and in place. What am I missing here?
Also note that llRotLookAt and llLookAt rotate the object around it's center of mass, and NOT around the root prim. As such, unless your crossbar is very large, the swing will rotate itself about the midpoint of the rope. A quick fix is to make the crossbar massive and transparent. I've got one now hanging from an 8mx2mx2m cross bar root prim, and it rotates very nearly at the center of the crossbar, even when occupied.
|