Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

floating

amiz Georgette
Registered User
Join date: 8 Jul 2008
Posts: 22
09-10-2009 07:44
I made a simple little floating animation thinking if i added it to a prim with a sit script in it that the prim would "follow" my avaitar but the prim is stationary and of course I bounce up and down.

What do I need to to to have the prim bounce slighty with me? I want others to used this as well without having to attach it, thats why i made the animation.

Can a rig up a vehicle script that would hover?
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
09-10-2009 07:48
You have to rethink your method. Animations are all client side, the avatar don't really move. You need to have the animation not bounce up and down, but move the prim up and down and you move with it.
EF Klaar
Registered User
Join date: 11 Jun 2007
Posts: 330
09-10-2009 07:48
I'm a bit out of my depth here, but might it make sense to have the animation stationary (as far as the bouncing goes) and have the prim do the bouncing?

(EDIT) I think Destiny beat me to it :)
Bloodsong Termagant
Manic Artist
Join date: 22 Jan 2007
Posts: 615
09-10-2009 10:38
heyas;

if you want a prim to move with you (in an animation), you have to attach it to yourself.

when you sit on something, it is basically a poseball. it stands still while you play the animation in it. it would be very disconcerting for people if their furniture moved with the sitting animations in it. (or other ::coughcough:: animations in it.)


if you want the object and the avatar to move together, you need to move the object the avatar is sitting on. the avatar is attached to it (instead of vice versa), so that is the base that needs to move.
_____________________
Why Johnny Can't Rotate:
http://forums.secondlife.com/showthread.php?t=94705
Indeterminate Schism
Registered User
Join date: 24 May 2008
Posts: 236
09-11-2009 06:29
Unfortunately there is often confusion about animating objects vs avatars.
If you make "an animation" in SL terms, it is for an avatar
If you want to "animate" an object you need a script that will change its size/shape/position

Lol, I tried to make a massage-chair once that did, indeed, vibrate when you sat on it. The results weren't good as micro-movements just didn't always register with the viewer and larger movements looked ridiculous - more like a poltergeist was throwing it around. In either case I couldn't update the position frequently enough to make it look like vibration. (There are other solutions, of course)
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
09-11-2009 09:53
how about this?

CODE

integer target;
vector offset = <0.0,0.0,1.25>;
vector tpos;
default
{
state_entry()
{

tpos = llGetPos() + offset;
target = llTarget(tpos,0.01);
llSetStatus(STATUS_PHYSICS|STATUS_PHANTOM,TRUE);
llSetStatus(STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z,FALSE);
llMoveToTarget(llGetPos() + offset,llVecDist(llGetPos(), tpos)*2);
}

at_target(integer tnum,vector targetpos, vector mypos)
{
llOwnerSay("Here");
llTargetRemove(target);
llStopMoveToTarget();
offset = -offset;
tpos = llGetPos() + offset;
target = llTarget(tpos,0.01);
llMoveToTarget(tpos,llVecDist(llGetPos(), tpos)*2);
}

not_at_target()
{
llMoveToTarget(tpos,llVecDist(llGetPos(), tpos)*2);
}
}
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369