Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

need script to allow avatar to pull a cart behind her or him

Sweet Primrose
Selectively Vacuous
Join date: 30 Nov 2006
Posts: 375
09-13-2007 00:32
I am looking for a script (I think) that will allow my two-wheeled trundle/cart to follow behind me smoothly and without the wheels leaving the ground. I currently have the trundle attached to my stomach, but when I walk, it waggles from side to side. Suggestions welcome. I can demonstrate the problem in world to whomever needs to see. Thanks.
Haruki Watanabe
llSLCrash(void);
Join date: 28 Mar 2007
Posts: 434
09-13-2007 04:50
well - you might wear an object, that sends it's position (x, y) to the cart whenever it changes and then adjust the cart's position accordingly...
This way, the cart won't be attached to anything and shouldn't «wiggle».

You'd have to implement a llListen to the cart, that listens to the object, which is attached to your AV...
Malachi Petunia
Gentle Miscreant
Join date: 21 Sep 2003
Posts: 3,414
09-13-2007 05:21
I think that the pelvis is the centroid of movement for an avatar, so whereas the stomach sways the pelvis shouldn't.

Even if you attach at the pelvis, you can use relative positioning to put the visual attachment point anywhere on the avatar (pull cart with ears?).
_____________________
Noctua Janus
Registered User
Join date: 22 Mar 2007
Posts: 29
09-13-2007 05:22
Or get yourself a walk animation that does not move the attachment point from side to side (or up and down) ;)

From: Malachi Petunia
I think that the pelvis is the centroid of movement for an avatar, so whereas the stomach sways the pelvis shouldn't.


Uhm..pelvis sways a lot, at least if you use sexy walk...
Uzul Lassard
Registered User
Join date: 26 Feb 2006
Posts: 4
09-13-2007 05:40
From: Sweet Primrose
I am looking for a script (I think) that will allow my two-wheeled trundle/cart to follow behind me smoothly and without the wheels leaving the ground. I currently have the trundle attached to my stomach, but when I walk, it waggles from side to side. Suggestions welcome. I can demonstrate the problem in world to whomever needs to see. Thanks.


What could possibly work is creating a sensor event trying to locate You with llDetectedPos and adjust object accordingly. The tricky problem is the lineing up the cart to the ground. Only way for it to remain on the ground and or prim surface is to make it physical. If you dont want it super realistic You can just use the vector from llDetectedPos to equalize the hight of the cart with the avatar hight. I am not sure how to realize that the cart stays behind you always like when you turn on the spot. Perhaps it is possible to track the avatar with llDetectedRot ?
Sweet Primrose
Selectively Vacuous
Join date: 30 Nov 2006
Posts: 375
09-13-2007 07:55
I should clarify that I am not a scripter, but that I saw someone pulling a little red wagon behind them, and they said it had a script in it. I looked in the script library, but I got lost pretty quickly and hoped someone might know off-hand what script would do the trick and whether it was open source or what vendor might have it available.

I will try attaching to the pelvis, as that is probably the least complicated suggestion, but I think it will still sway side to side.....and since that is the most common attach point for prim skirts, potentially annoying. :)

Thanks much everyone.