Rotating a linked prim of an attachment..no matter which way I'm facing >_<
|
|
Regan Flasheart
Adulterated content
Join date: 25 Nov 2005
Posts: 25
|
11-06-2007 16:06
First of all, I'm not sure this is even possible as I've never seen it done, so feel free to scorn me for my lack of LSL know how. I'm building a vehicle attachment (3 in fact, 255 being the per object prim limit) in order to get the requisite amount of detail, set up the bonnet and boot (hood and trunk to some of you) to open and close when clicked. Everything went swimmingly in the sandbox, both did as they were told, no drift, no problems at all. First time out as an attachment and everything goes haywire, the prims still open and close along the correct axis, but ALSO rotate around another axis, failing to return to their original position when clicked: http://img137.imageshack.us/my.php?image=juliarotationerrorcv2.jpgI can see the prim is trying to line up with world axes, or at least it looks that way to my untrained eye. I'd rather not resort to llSetAlpha if possible, the prims looked so nice when they actually rotated... Any enlightenment would be much appreciated  You might even get a small red car for your trouble 
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
11-06-2007 17:55
nice work... possibly the issue you are running into is realted to the prim using the wrong rotation, eg global vs local llGetRot() * rotation-amount // is global rotation-amount * llGetRot is local in Child prims llSetPrimitveParams behaves wrong, see jira SVC-93 for a work around... there's also some weirdness related to rotations in attachments that I don't remember if it's a single prim you can try the SUPER simple door script I wrote, not sure if it'll work in an attachment but here it is I also have some help on basic rotation tasks in my user page on the wiki @ 
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Regan Flasheart
Adulterated content
Join date: 25 Nov 2005
Posts: 25
|
11-07-2007 02:31
Thank you!
although I don't quite understand why that should work (LSL is a little like sorcery to me) I shall try it when i get home. I'm sure there'll be a stunning moment of revelation when everything becomes crystal clear ^_^
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
11-07-2007 05:35
From: Regan Flasheart Thank you! although I don't quite understand why that should work (LSL is a little like sorcery to me) I shall try it when i get home. I'm sure there'll be a stunning moment of revelation when everything becomes crystal clear ^_^ heh it's an order of operations thing with rotations... it matters which you do first, and where you start... take a book, rotate it 90deg right from the top, then 90 degress up from the right take another book do the same, but reverse the order... 2 different positions/facings
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Regan Flasheart
Adulterated content
Join date: 25 Nov 2005
Posts: 25
|
11-07-2007 11:13
Oh I see...sort of, anyway. Your simple door scipt worked perfectly, even in heavy lag. As soon as I get all 3 versions working properly I'll send you a totally-non-trademark-infringing italian coupé 
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
11-07-2007 18:48
cool glad it worked, I wasn't 100% because of issues rotating attachments to world relative coordinates... glad to know it doesn't' affect local rotations for fixed position animations. might make a car myself =)
I'm sorely missing my old '84 Pontiac 305 v8 with quadra 4barrel carb, in electric blue... that girl could MOVE =)
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Regan Flasheart
Adulterated content
Join date: 25 Nov 2005
Posts: 25
|
11-14-2007 14:16
Sounds terribly eco unfriendly but damn good fun, there's nothing like the gurgle of a big V8 to make one's hairs stand on end  If you do, IM me in world for anything you might need, I hope to have reliable multi prim wheel rotations sorted out soon.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
11-14-2007 22:22
From: Regan Flasheart Sounds terribly eco unfriendly but damn good fun, there's nothing like the gurgle of a big V8 to make one's hairs stand on end If you do, IM me in world for anything you might need, I hope to have reliable multi prim wheel rotations sorted out soon. yup, terribly eco-bad.... but oh so much fun =) cool, if you do sort that out I'd love to see, I can think of other applications >=)
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|