Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

That Sinking Feeling

Jay Karlfeldt
Happy Scripter
Join date: 4 Nov 2005
Posts: 51
05-07-2008 16:04
I have a large and complex program, involving physic objects, which has had problems since Havok4. Prior to Havok4 the scripts worked now the participants sink into the floor.
The following is the essential part of the code and demonstrates the problem. If I set the hover height up by +2 metres they do not sink, but then in another part of the script they slowly rise to 2 metres above the ground.
Anybody any ideas please, have tried telling the Lindens through a ticket and I do not think they believe me.


key av;
float hover;
vector pos;
default
{
state_entry()
{
vector size = llGetAgentSize(llGetOwner())/2;
llSitTarget(<0, 0, size.z>, ZERO_ROTATION);
llSetStatus(STATUS_PHYSICS,FALSE);
}
on_rez(integer start_param)
{
llResetScript();
}
changed(integer change)
{
if(change & CHANGED_LINK)
{
av = llGetOwner();
if (llAvatarOnSitTarget() != NULL_KEY)
{
llRequestPermissions(av, PERMISSION_TRIGGER_ANIMATION);

}
}
}
run_time_permissions(integer perm)
{
llStopAnimation("sit_generic";);
llStopAnimation("sit";);
llSetBuoyancy(1.0);
llSetStatus(STATUS_PHYSICS,TRUE);
pos = llGetPos();
hover = pos.z - llGround(<0,0,0>;);
llSetHoverHeight(hover, FALSE, 10);
llStartAnimation("boogie";);
llSetTimerEvent(15);
}
timer(){
llSetStatus(STATUS_PHYSICS,FALSE);
llSetPos(pos);
}

}

Thanking you in anticipation of a revealing insight

Jay
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
05-07-2008 17:13
Would it be ok for they stay in the same x/y position? If so, llMoveToTarget might do the trick.

If not, there seems to be at least a couple JIRA bugs related to this. Vote them up and nag Sidewinder about getting them fixed..
Jay Karlfeldt
Happy Scripter
Join date: 4 Nov 2005
Posts: 51
This is part of a much larger script
05-07-2008 18:00
Thanks Sindy, but prior to this I am pushing this object and also setting the height 2 metres higher while curing the problem when the object is stationery, means it climbs when being pushed to 2 metres above ground.
I have a JIRA bug SVC-2310 lodged if you want to vote, I was hoping I had made a mistake in my script.