llTargetOmega on Physical Object
|
|
Moose Pegler
Registered User
Join date: 22 Apr 2006
Posts: 33
|
11-28-2006 14:31
I am unable to get llTargetOmega to work on a physical object.
The object that is supposed to rotate is physical, has mass 2.78 and consists of two linked prims. It is in fact a very hollow cube, 2m on a side, with an axis at the center of gravity.
The object that is holding it off the ground by the axis, kind of a stand, is also physical.
I've sampled gain from 0.01 to 100000.0 and all I get is the white sprite.
llSetTorque and llApplyRotationalImpulse work just fine.
Any suggestions?
Thanks much, Moose
|
|
2k Suisei
Registered User
Join date: 9 Nov 2006
Posts: 2,150
|
11-28-2006 15:27
I'm guessing that you've been a very naughty boy and you placed the rotation script into a child prim. I've not logged into to test my theory, but I believe that you can't rotate a child prim in a physical set.
In otherwords - the rotation script must be in the root.
maybe...
|
|
Moose Pegler
Registered User
Join date: 22 Apr 2006
Posts: 33
|
11-28-2006 15:46
Not THAT naughty. The script is in the axle which is the root (of the two prims).
BTW, I'm happy to transfer the corpus delecti to anybody that would like to take it out for a (non-)spin.
Cheers, Moose
|
|
2k Suisei
Registered User
Join date: 9 Nov 2006
Posts: 2,150
|
11-29-2006 01:29
I done me some tests: You can drop a rotation script inside a child prim of an object and the child prim will rotate just fine. Then you can enable physics on the object and it still works fine. Now if you take the object into your inventory and then rez it again, the child prim wont budge. OMG! it's dead! Wait! Maybe it just needs resetting on rez? So I then placed a llResetScript() into the on_rez() event, in order to reset the rotation. I rezzed the object and the child prim was rotating, but so was everything else linked to it. Oh the horror! Conclusion: It's bugged!!. Like anything buggy in LSL, even if you get it working, it's questionable whether it'll work in future "fixed" versions of SL. Move on, man! Let it go! 
|
|
Moose Pegler
Registered User
Join date: 22 Apr 2006
Posts: 33
|
11-30-2006 11:58
I HATE to give up but I'm afraid in this case you're right.
I rez the guy and he works fine. I build him from scratch and he works fine. I log out and log back in and he works fine. I change his color and he quits never to go again.
Sigh.
So how does one make a rotating object that impacts other objects? A bucket containing a ball that rolls out when the bucket is tipped up, for example?
Maybe one doesn't.
Anyway thanks much for your help, 2k.
Cheers, Moose
|
|
Moose Pegler
Registered User
Join date: 22 Apr 2006
Posts: 33
|
12-01-2006 06:57
I should have listened to 2k a week ago. llRotLookAt is the ticket. It is probably a challenge (at least it is for me) to get it as smooth as llTargetOmega but if you llSetBuoyancy(1) for a physical object, llRotLookAt will rotate it just fine and it will impact other physical objects as it turns.
Next time I pay heed to the experts!
Cheers, Moose
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
12-01-2006 14:07
I've noticed recently that 'llTargetOmega()' in a physical object will start it rotating, but the object will stop rotating completely after a few seconds, even if it isn't touching anything (using 'llMoveToTarget()' to keep it in a single spot). I'm pretty disgusted with 'llTargetOmega()' all around. Try putting it in an attachment and having it switch axes every few seconds. You'll get to a state where you have to actually re-SAVE (not re-compile!) the script in order to have it start functioning again. Weeeee!
|
|
2k Suisei
Registered User
Join date: 9 Nov 2006
Posts: 2,150
|
12-01-2006 15:52
Me and llTargetOmega() haven't spoken in days.
Even on non physical objects it'll sometimes rotate slower than it's supposed to, or even just plain stop! So you have to click on your object in order to get it moving again.
It's terrible! Just terrible!
...and another terrible!
Terrible!
|