Jora Welesa
Dark Lady of the Sith
Join date: 11 Jul 2005
Posts: 153
|
10-20-2005 17:49
Hello all.  I make ships and I got an odd order for one. It will have wings that rotate to a certain angle when the ship reaches a certain speed. Getting it to recognize the speed isn't difficult, but getting the wing assemblies to rotate properly is turning out to be something else entirely. Basically, each wing is made up of 3 prims. The main wing and the engine attached to it. Linking is done as: Engine piece 2 --> engine piece 1 --> main wing(sub-root) Remember that the actual root prim is part of the fueslage. When I put the call to llSetRot() in the main wing part, it rotates the wing just fine, but the engine stays in place. I can put the same llSetRot() function in the engine followed by an llSetPos(), but due to built-in delays, the wing gets there well before the engine does. The question is how can I rotate all these parts together so that everything ends up at the right place at the same time?
|
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
10-20-2005 22:33
As long as we dont have hirarchial linking, we're gonna have to deal with stuff like this happening  The wing and engine shouldnt be significantly out of sync (if they are then there may be another problem) but there's always going to be an annoying glitch between when the wing rotates and when the engine rotates, espicially in laggy sims. By "gets there well before" how much time are you talking about exactly? ==Chris
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
10-20-2005 22:57
Full scale animation of linked prims in LSL is HARD to do right.
You might want to look at some of my critters to see what is possible (I can send you a rideable, walking mammoth if you IM me).
Or you can wait a week and some days until I finalize the Multi-Joint animator B, then it will all be a matter of entering the joints' positions and chain order, and their rotations for each animation frame, on a single notecard.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
Jora Welesa
Dark Lady of the Sith
Join date: 11 Jul 2005
Posts: 153
|
10-21-2005 15:56
Thanks for the replys.  The ship in question I've been asked to build is an X-Wing from Star Wars. The buyer wants me to be able to have the wings wither together or split apart. I can't use the invisible prim method, as that would break the 30 prim limit. I'll wait and see about that Multi-Joint animator. That has a lot of promise.  Again, thanks.
|
Lightwave Valkyrie
Registered User
Join date: 30 Jan 2004
Posts: 666
|
10-21-2005 16:45
ohhh 'multi-prim animator' sounds cool i cant wait. thx Jesrad  -LW
|
Logan Bauer
Inept Adept
Join date: 13 Jun 2004
Posts: 2,237
|
10-22-2005 09:10
Just a suggestion, I would use llSetPrimitiveParams to set both the position and rotation of the child object instead of SetPos and SetRot - this should make it work a little smoother - but you'll probably still have complex movement appear to "break apart" or not move exactly in synch all of the time.
Another note, since each time you call SetPrimitiveParams,SetPos or SetRot, it'll delay for 0.2 seconds, so if you are queueing up and calling more than one new local position in a short amount of time, make sure to delay or put llSleep into your main vehicle script - this is assuming you have one linkmessage coming from your main vehicle script telling the wings to change position. IF by some chance you have each piece of wing checking for it's speed and then animating accordingly, this would be another thing that would really keep it out of synch - instead you might want to have your main vehicle script determine the speed and then send a linkmessage, then have each childprim reposition when triggered by the linkmessage.
|