Jump to content

Rotation issue, please help!


TheGreatReef
 Share

You are about to reply to a thread that has been inactive for 3077 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I'm working on a karambit that is supposed to spin around your finger on the local x axis (script is in a root prim). I'm using TargetOmega to do the spinning, but i've run into nothing but problems. The TargetOmega doesnt rotare around the LOCAL x axis like i want it to, and it rotates on the attachment axis instead. Then, i have another part in the script that is supposed to thet the knifes rotation back to its original raotaion, but it doesnt seem to be doing that correctly either. I've been trying to figure this out for a few days now, to no avail. If someone knowledgeable with this could shed some light on this situation, i would appreciate it greatly. Thanks!

 

Heres the bit of code: 

            vector rot = llRot2Euler( llGetLocalRot() );
            llStartAnimation("Spin");
            llPlaySound("karambitspin", 1.0);
            llTargetOmega(<1.0,0.0,0.0>*llGetRot(),20,1);
            llSleep(1);
            llTargetOmega(ZERO_VECTOR,0,0);
            llStopAnimation("Spin");
            llSetLocalRot(llEuler2Rot(rot));

 

Link to comment
Share on other sites

When you use llTargetOmega to move an attached prim, it will spin around the attachment point.  Take a look at the colorful table at http://wiki.secondlife.com/wiki/Rotation#Single_or_Root_Prims_vs_Linked_Prims_vs_Attachments .  You can't easily spin it around any other axis, because the servers aren't tracking the position or rotation of your av's arms and hands. That also means that you can't reset the object's position back to where it started because, again, the servers never knew where that was.

Link to comment
Share on other sites

If your karambit needn't survive close inspection, you could make it by placing an alpha image of it on the face of a prim, and then rotate (animate) the texture. Since you can reposition the prim any way you wish with respect to the attachment point, you've got complete control over the rotation. You'll have to reverse the texture and place it on the opposite face with a reverse rotation, and an edge on view will reveal that the karambit is just a flat image on opposite sides of a prim, but that might be better than nothing.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3077 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...