Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Rotation Script For Physical Sphere

Fallon Mills
|íñÐèñ |ãß møÙ§ë
Join date: 24 Feb 2007
Posts: 30
06-16-2007 03:42
I'm looking for the rotation script that will move a physical sphere. The IITargetOmega doesn't work for that so I'm told. Does anyone have a open source one they can drop on me or send me the link to copy it please?
TIA
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
06-16-2007 04:50
Have you *tried* llTargetOmega()? At least per the wiki, it should work with physical objects, though the parameters will no doubt need tweaking. (For non-physical objects, this function has numerous, uh, "quirks," but I'd actually expect less entropy in its behavior with physical objects.)
Dytska Vieria
+/- .00004™
Join date: 13 Dec 2006
Posts: 768
06-16-2007 09:18
You could rotate the texture for the same result. I am working on a little animated ball and do both:

state_entry()
{

llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES,1,1,1.0, 1,0.01);
llTargetOmega(<0.0,0.08,0.08>,PI,0.1);
}

The above does both, then:

state_entry()
{

llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES,1,1,1.0, 1,0.01);
llTargetOmega(<0.0,0.08,0.08>,PI,0.1);
llSetStatus(STATUS_PHYSICS, TRUE);
llSetBuoyancy(0.001);
}


Seems to animate the texture and rotate the sphere, but it is hard to tell! It seems to rotate, but it is also jittering around.
_____________________
+/- 0.00004
Fallon Mills
|íñÐèñ |ãß møÙ§ë
Join date: 24 Feb 2007
Posts: 30
06-18-2007 13:44
IITargetOmega is client side, it has no effect on a physical sphere. I already tried it.
I have a a paddle wheel made so I want the physical ball to drop and sit between the paddles and then to fall out to roll along a path.
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
06-18-2007 15:06
From: Fallon Mills
IITargetOmega is client side, it has no effect on a physical sphere. I already tried it. [...]

I'm really not trying to sell llTargetOmega() -- every time I've used it for anything but the simplest thing, it's found a new way to surprise me -- but really, it works on physical objects, and then it's not just client-side: I made a .5m sphere and scripted it to be physical, then set llTargetOmega(<0,0,1>, 1.0, 2.0) ... it spun like a top for a bit, toppled over, and rolled around, klunking against obstacles until it wandered to parcels it couldn't enter. Perhaps not exactly the effect you're going for ;) , but physical nonetheless.