Jump to content

Rotating Drum


naughtyniece
 Share

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

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

Recommended Posts

Hi, ok I made a hollowed out cylinder prim, added this script and made it physical, it rolls , but all over the floor, I tried sticking a cylinder through it, or anything  to keep it in place, but it just breaks free from anything, so how do I keep it in place and rotate?

default
{
   
    touch_start(integer total_number)
    {
        llTargetOmega(llRot2Left(llGetLocalRot()), PI, 1.0);
        llSetTimerEvent(5);
           
    }
    
    timer()
    {
      llTargetOmega(llRot2Up(llGetLocalRot()), 0, 1.0);
    }  
}

 

Link to comment
Share on other sites

On 3/5/2018 at 4:02 PM, Rolig Loon said:

 

On 3/5/2018 at 3:57 PM, Love Zhaoying said:

I think one drawback is, the thing you’re rotating can’t be attached to the thing it is resting on. Just “resting on it”/“rezzed on it”. Or, the entire object/impulse would rotate.

Not an issue, as long as the script is in the child prim that is actually rotating. The entire linkset will only rotate if you put llTargetOmega in the root.

 

See this exchange between me and @Rolig Loon. I don’t know if this will work if drum is physical..but the point of this suggestion was to attach the drum to the stand as part of a linkset, make sure the drum is NOT the root prim, and put the script in the drum - NOT the root prim. I will re-read to see if Rolig made a suggestion on how to “cradle” the drum if physical (maybe it won’t work as a child prim if physical, I don’t know).

*Edit* I didn’t find anything else in the thread except other unrelated solutions.

Edited by Love Zhaoying
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2309 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...