Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Vehicle door

TXGorilla Falcone
KWKAT Planetfurry DJ
Join date: 4 May 2004
Posts: 176
06-30-2004 17:13
Anyone out there have or know of a way to have a door on a vehicle?

I have a large ship with a curved half end and Im needing a door for the back end pefibly clickable on open...
I have tryed some of the normal door scripts but cant find one that doesnt rotate out of position
Buck Blanc
Master Mechanic
Join date: 11 May 2004
Posts: 50
Correct me if Im wrong....
07-06-2004 11:47
Greetings, I think doors wont work on vehicles for a few reasons, but I could be way wrong.

Isnt it that vehicles have to be physical and all the prims have to be linked, so if you link your door to your vehicle it wont work properly, correct?

If doors are do-able on vehicles my suggestion would be to keep modifying the door script you have till it works for your application. Also modify one small thing at a time to make it easier :)
CoCoNoNo Anubis
Skylark Mechanic
Join date: 28 Jun 2004
Posts: 40
07-06-2004 15:13
I saw some vehicles with sliding doors in cordova...that would be the best place to hang out and ask questions about such a thing....

the idea I have is that the physically moves the prim over so many units (local distance, not a universal one).
_____________________
-CoCoNoNo
Current Major Projects:
CoCoHoBo - Personal conveyance not for the faint of heart.
Dreamer Class Skyships - Personalized skycraft for small parties or gatherings.
Hawk Statosky
Camouflage tourist
Join date: 11 Nov 2003
Posts: 175
07-06-2004 15:43
Coco's right - it's perfectly doable.
Movement (as in llSetPos) is easy, as it's just a position relative to the root prim. Rotation is a bit trickier as llSetRot doesn't take into account root prim rotation properly, but it _is_ doable.
_____________________
This .sig has been cancelled due to lack of interest.
Doiv Huber
Junior Member
Join date: 12 Jun 2004
Posts: 2
07-13-2004 08:39
I have a similar application for such knowledge. I want to be able to rotate a linked prim in one of my vehicles, but I cannot understand llSetRot() at all. The reference says:

"If the object is not physical, this function sets the rotation. If the object is a child, the position is treated as root relative and the linked set is adjusted."

It says it is treated as root relative, which suggestes to me that I don't have to worry about the root prim's rotation. But it talks of the position being root relative, I want to set the rotation! Is this a typing error in the reference?

Any way, all my attempts to use llSetRot() have failed, I can only ever make the prim randomly rotate in a seemingly unpredictable manner. I've tried compensating for whatever causes this behaviour, but i'm lost with whatever llSetRot() uses, quaternions I think.

Could somebody please give some more information on how to use llSetRot() to do this. Thanks.
Ezhar Fairlight
professional slacker
Join date: 30 Jun 2003
Posts: 310
07-13-2004 08:50
ChildRotation
_____________________
Doiv Huber
Junior Member
Join date: 12 Jun 2004
Posts: 2
07-13-2004 12:36
Hey thanks Ezhar Fairlight. I don't understand the use of ZERO_ROTATION, nor do I understand the need for LLGetLocalRot(), but it works a treat!
Zenshi Kojima
Junior Member
Join date: 28 Feb 2004
Posts: 9
slidin door!
07-29-2004 16:30
TXGorilla, u want a sliding door??? i made one, just contact me in SL... hmz ill try and post it here! (its on touch)
========================
edit :scroll down for the good script sorry for the problems the wrong one has caused
========================
this makes the door slide upward when touched :D
llGetLocalPos or llGetLocalRot gets the position or rotation relative to the root prim, it also uses the Axis of the root prim.
ZERO_ROTATION is a constant which equals <0,0,0,0>, this can come in handy if you want it to revert to zero rotation or something. I used in my airbus and it works :D, if it doesnt for u contact me (although im going on a holiday next week, to italy :D:D, so i might not be online that much:(:()
Oh and Doiv, you figured that out right, rotations use qauternions (WHICH I HATE :mad: ) so i just use a llEuler2Rot() which converts the euler rotation (xyz) to a quaternion. be sure to 'mulitply' it by DEG_TO_RAD so it wont be screwed up.
phew lotsa text here i hope i have helped anyone!
Korg Stygian
Curmudgeon Extraordinaire
Join date: 3 Jun 2004
Posts: 1,105
07-30-2004 07:58
When I try to run this I get a syntax error on line 5, pos 0.

Am I stupid or am I ovelrooking somethig obvious in terms of matched pairs of parens - because I don't see the cause of the compile error?
Zenshi Kojima
Junior Member
Join date: 28 Feb 2004
Posts: 9
could be my error :(
07-30-2004 09:10
sorry could be my mistake!!! gonna check!

edit:
the correct script (that i use!)
========================================
integer SWITCH;
default
{
state_entry()
{
SWITCH = 1;
}

touch_start(integer tn)
{
if(SWITCH == 0 )
{
llSetPos(llGetLocalPos() +<1.5,0,0>;);
SWITCH = 1;
}
else if(SWITCH == 1 )
{
llSetPos(llGetLocalPos() -<1.5,0,0>;);
SWITCH = 0;
}
}
}
============================
Kayin Zugzwang
A Superior Grouch
Join date: 7 Jun 2004
Posts: 269
08-18-2004 12:21
Sliding? You think small. I have a swinging door. It just takes some clever doing.
Zenshi Kojima
Junior Member
Join date: 28 Feb 2004
Posts: 9
i thought he wanted sliding.... :D
08-27-2004 14:52
lol i thought he wanted it sliding... anywayz i have a rotating one that i will totally script for u, just contact me in world oh and if someone else wants it, just contact me!!!
Doops Lomax
Registered User
Join date: 1 May 2004
Posts: 4
09-03-2004 19:28
If anyone ever wants doors for their vehicles, I can help you with those. Just IM me anytime. I like to install them for some reason. :S