Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Help with drifting elevator please

Leatherboy Hansen
Registered User
Join date: 24 Jun 2006
Posts: 3
08-17-2009 12:40
I'm building a physics elevator. Got it going up and down fine, but on long stretches, especially going downwards, it drifts along the X and Y axes. Doesn't actually come out of the tube, as (it looks like) the AV sitting on it is keeping it in. When in motion, the platform is phantom, and the AV is held in place on a pose script. Apart from the drift it works a treat.

The vehicle type I'm using is Balloon, For propulsion I'm using an llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION on a timer, with an llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE for braking. Don't want to use a push as I'd like to keep pushes off on my sim.

Is there any way to lock the X and Y in a vehicle so it doesn't drift?

Any help would be appreciated.
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
08-17-2009 13:08
Don't know if the SL wind affects a vehicle, it might; Some forces do:)
Is it Normal to use a vehicle for an elevator? I didn't see it before
_____________________
From Studio Dora
Kaylan Draken
Registered User
Join date: 2 Dec 2006
Posts: 127
08-17-2009 13:58
maybe this will work:) at least it did help get of the drift of my elevator.

llSetStatus (STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z, FALSE);
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
08-18-2009 02:46
Even with the rotations defeated, I get this too when the passengers clomp around while the elevator is moving and bump into the walls of the cab. My kludgy "solution" is to wait until the thing is obviously stuck, then make it non-physical and llSetPos() the thing to the target X & Y and current Z, then set it back to physical and restart the llMoveToTarget(). I suppose one could try to avoid it getting stuck in the first place by checking for drift on a timer and doing the same kludge (but in my application, I see occasionally getting briefly stuck to be kind of a feature :o ).
_____________________
Archived for Your Protection
Leatherboy Hansen
Registered User
Join date: 24 Jun 2006
Posts: 3
Thanks
08-18-2009 08:48
Thanks for your help, guys. I don't have the walking-around problem as my passengers are rooted to the spot on pose balls. I'll try the STATUS ROTATE limiting one - and I hadn't thought about the wind. Good idea too.

Thanks again :-)
Vance Adder
Registered User
Join date: 29 Jan 2009
Posts: 402
08-18-2009 09:51
I haven't really done anything with vehicles, but... maybe you could setup a fairly frequent timer to compare the elevators current X and Y values to where they should be, and if they start to drift, then change your VEHICLE_LINEAR_MOTOR_DIRECTION to drift the elevator back to where it should be until your X and Y values are acceptable. You'd probably have to play with how much tolerance you'd allow.