Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

(newbie question) Keeping a vehicle upright?

Elo Himmel
Registered User
Join date: 22 Aug 2008
Posts: 1
08-23-2008 16:17
How does one go about keeping a vehicle upright? I've tried vertical attraction, but the vehicle still misaligns itself when crashing into steep hills, objects, etc.

Basically, I'm trying to find some way of keeping a hovering vehicle's rotation set at x=0, y=0 no matter what happens to it. Or at the very least, allow it to automatically return to that after hitting uneven terrain.

Thanks in advance for a reply!
Dylan Rickenbacker
Animator
Join date: 11 Oct 2006
Posts: 365
08-24-2008 10:10
Most of the time people seem to be using additional invisible prims to keep their vehicles in the desired position.
Taeas Stirling
Registered User
Join date: 4 Sep 2004
Posts: 74
08-24-2008 11:33
make sure you have this line in your vehicle script
llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, <0, 0, 0, 1> );
it forces your vehicle to remain right side up
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
08-24-2008 11:36
Reference frame won't make any difference to this (well, unless your vehicle's root prim is pointing in an odd direction).

What you should be looking at here is the vertical attractor.
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!

http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal

http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
08-24-2008 11:50
Have you tried llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y, FALSE)?