Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Vehicle Question

Walker Spaight
Raving Correspondent
Join date: 2 Jan 2005
Posts: 281
04-03-2005 06:23
Is it possible to have a door on a vehicle that has more than one prim? I.e., the door has more than one prim, not the vehicle.

I'm assuming the Hinge functions don't actually work very well, as the wiki seems to indicate. The only way I can see to make a vehicle door is with llSetLocalRot or llSetPos for a sliding door, both of which only move the one prim.

Any way to move a door that's made of more than one prim?

thanks
_____________________
Read The Second Life Herald: All the fairly unbalanced news we see fit to print.

More news and musings at Walkering.com

"Thank you, Walker Spaight, wherever you are!!"
--Trinity Serpentine
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
04-03-2005 08:36
Yes. By having a seperate script in each prim rotating/moving that prim in synch with the others. It's not always pretty, depending on conditions in the sim, but most of the time it works OK. llMessageLinked is your freind here for having them all work at the same time.
_____________________
Walker Spaight
Raving Correspondent
Join date: 2 Jan 2005
Posts: 281
04-03-2005 09:58
Thanks, Jillian. I was thinking of something like that but was afraid it would look too clunky. I will check it out and report back on my results.
_____________________
Read The Second Life Herald: All the fairly unbalanced news we see fit to print.

More news and musings at Walkering.com

"Thank you, Walker Spaight, wherever you are!!"
--Trinity Serpentine
Cubey Terra
Aircraft Builder
Join date: 6 Sep 2003
Posts: 1,725
04-03-2005 10:03
From: Jillian Callahan
Yes. By having a seperate script in each prim rotating/moving that prim in synch with the others. It's not always pretty, depending on conditions in the sim, but most of the time it works OK. llMessageLinked is your freind here for having them all work at the same time.


I try to avoid having moving parts that have to move in synch with each other. It looks pretty weird when the pieces move/rotate at slightly different times.
_____________________
C U B E Y · T E R R A
planes · helicopters · blimps · balloons · skydiving · submarines
Available at Abbotts Aerodrome and XstreetSL.com

Rickard Roentgen
Renaissance Punk
Join date: 4 Apr 2004
Posts: 1,869
04-03-2005 11:05
if you are bent on having multiple prims then a sliding door is the better option. rotating is problematic since the centers of rotation are different.
_____________________
Talena Wallaby
Registered User
Join date: 20 Mar 2005
Posts: 19
04-03-2005 12:03
From: Walker Spaight
I'm assuming the Hinge functions don't actually work very well, as the wiki seems to indicate.


According to Andrew, this should be addressed in 1.7, along with vehicles, as per an ingame conversation with him.

I'd have to concur with the general consensus. Rotating/moving multiple prims is nasty math and slightly lag makes the whole thing look excessively awkdward.
Vilhelm Dougall
Registered User
Join date: 22 Mar 2005
Posts: 28
04-03-2005 18:06
My doors all work by just deforming the primitive that it's made from. It gets smaller when you click on it, and then returns to normal size either after X amount of time, or when clicked on again. It doesn't work while physics are turned on for some reason, but that's why my really big vehicle with doors has an ignition button =P
Reitsuki Kojima
Witchhunter
Join date: 27 Jan 2004
Posts: 5,328
04-05-2005 07:33
From: Vilhelm Dougall
My doors all work by just deforming the primitive that it's made from. It gets smaller when you click on it, and then returns to normal size either after X amount of time, or when clicked on again. It doesn't work while physics are turned on for some reason, but that's why my really big vehicle with doors has an ignition button =P


No function that changes the mass of an object works while the object is physical.
_____________________
I am myself indifferent honest; but yet I could accuse me of such things that it were better my mother had not borne me: I am very proud, revengeful, ambitious, with more offenses at my beck than I have thoughts to put them in, imagination to give them shape, or time to act them in. What should such fellows as I do crawling between earth and heaven? We are arrant knaves, all; believe none of us.
Damanios Thetan
looking in
Join date: 6 Mar 2004
Posts: 992
04-05-2005 07:56
Another option is to:

- actually delink the prims before rotating/moving them (use a list of linknumbers or check the llGetLinkName() and name all the door prims 'doorprim')

- relink them to eachother... with your rotation/move point as root prim.

- do your rotation. move etc.

- relink the door with the vehicle.

Do the same, but with reverse rot/move to close the door.

The object needs to be non physical during this operation though. Otherwise you'll either have your door fall off into pieces, or when moving, have it actually explode. (both fun)

Also it requires the owner to agree on delink/relink (permission requester) before you can actually do this.

A third problem is with the owner moving/taking etc. the vehicle while the door is in motion. As it will be left behind...


On a different note. It's possible to do non-axial rotations nowadays by doing a move and a rotate at the same time using one llSetPrimitiveParams(). The math is horrible though...
_____________________
Walker Spaight
Raving Correspondent
Join date: 2 Jan 2005
Posts: 281
04-06-2005 07:36
Thank you all for the feedback! I just made a 1-prim sliding door in the end and will wait around for the Hinge stuff or try some other solutions on a future project.
_____________________
Read The Second Life Herald: All the fairly unbalanced news we see fit to print.

More news and musings at Walkering.com

"Thank you, Walker Spaight, wherever you are!!"
--Trinity Serpentine
Racer Plisskin
Rezerator
Join date: 2 Jan 2005
Posts: 147
04-06-2005 18:19
If you are interested, IM me in game and I can show you how I achieved this with a 2 prim car door (door prim and glass prim).

both prims rotate around the same point. They rotate around the lower front corner of the glass and the upper front corner of the door pannel... Had to use 2 prims as they are on different planes.

It works but it _does_ look a bit clunky sometimes (especialy on a laggy simm). Done the way I do it, there is no significant math work to figure out, just have to take some initial vector/roatation snapshots and plug in the numbers as needed.

I can't wait for the new physics angine to make these problems easier and cleaner to solve. ;)

Racer P.