Jump to content

Rotating a whole object aroun axis of a linked prim?


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

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

Recommended Posts

polerota.jpg

How can I do it that the center point is not on the triangle but instead of that on the pole? I want to move this whole object aroun the center point of the pole and not the triangle cube. In fact I want to rate the pole with all linked objects but the pole should stay on its point while rotating.

I dont find a way in Viewer 3. Anybody has an idea?

Link to comment
Share on other sites

That VIewer 3 is the biggest pain you can get. I still dont find it. I logged to phoenix viewer and found an option called "axis on root" in just a second. Sadly I work with mesh project right now so that I cant use any other viewer then Number 3.

I am searching and searching and just cant find the option I am looking for. There is nothing in any build options. Neither in the build menu or in the build drop down on top. So you sadly couldn´t help... anyway thanks :)

That did cost me hours already for searching. Soon I guess this Viewer cant rotate things around a rootprim. Its a pain to find things in V3. I wish they would not shut down the good old viewers.

 

 

 

  • Like 1
Link to comment
Share on other sites


Freecilla Kuhn wrote:

Make the pole the root prim with the rotation script in it.

Unlink it, edit the triangle hold shift and click on the pole and link.

rotation script? I do not talk about a rotation script. lol :) I talk about manualy rotate an linked object.

 

Link to comment
Share on other sites

Well, I know you're not talking about rotating with a script, but now that you mention it.......

You can rotate your linked object around the local Z axis of its root prim if you use a fairly simple script.  I know it's more of a nuisance than having the function built in to the viewer, but here's one that works.

//Quick Rotate -- Rolig Loon -- August 2011 

//Rotates a linked object around the LOCAL Z axis of its root prim
//To rotate around the root prim to Z degrees from its ZERO_ROTATION (that is, its local Z = 0.0 degrees),
// type "/3 Z" (without the quotes)
//To rotate around the root prim by Z degrees from its CURRENT rotation,
// type "/3 Z more" (without the quotes)
// To remove this script, type "/3 end" (without the quotes)
default{ state_entry() { llListen(3,"",llGetOwner(),""); } listen(integer channel, string name, key id, string msg) { if (llToLower(llGetSubString(msg,-4,-1)) == "more") { float Deg = (float)llGetSubString(msg,0,-5); llSetRot(llEuler2Rot(<0.0,0.0,Deg>*DEG_TO_RAD)*llGetLocalRot()); } else if (llToLower(llStringTrim(msg,STRING_TRIM)) == "end") { llRemoveInventory(llGetScriptName()); } else { vector Rot = llRot2Euler(llGetRot()); llSetRot(llEuler2Rot(<0.0,0.0,(float)msg>*DEG_TO_RAD)*llEuler2Rot(<Rot.x,Rot.y,0.0>)); } }}

 With just a minor bit of surgery, you could change the script to rotate around the X or Y axes instead.

  • Like 1
Link to comment
Share on other sites

Thank you very much. I will try that script. Looks like a good workaround then.

I hope LL will had something like this to V3 like Phoenix Viewer has.

About your script.. when I put it into mesh items for just some minutes,, I hope it doesnt affect my PE? I did hear it can increase PE of an mesh object when we put in scripts.

 

 

Link to comment
Share on other sites


Miyo Darcy wrote:

 

About your script.. when I put it into mesh items for just some minutes,, I hope it doesnt affect my PE? I did hear it can increase PE of an mesh object when we put in scripts.

 

That's a really good question. I am not paying any attention to mesh at the moment, so I don't have a clue what the correct answer is.  In a sane world, though, whatever effect it might have on PE should be reversible.  Note that you can remove the script by just typing "/3 end".  My bet is that the script won't change your PE at all, but you can figure that out with a very simple experiment.

Link to comment
Share on other sites


Freecilla Kuhn wrote:

hmmm the say /3 Z doesn't seem to do anything, shouldn't it move when saying /3 Z and /3 Z more?

Miyo you meant rotation like a door?

 

yes. Similar rotation like a door yes. I made a stairscase in my 3d app but just a quater of an spiral staircase.. just to save prims. So I can duplicate this quarter of spiral staircase inworld anyway and it is no problem to set the duplicate higher.. but rotate it 90degrees on the pole is my problem. Phoenix Viewer can do it but doesnt support mesh. V3 cant do it but supports mesh lol. So you see it is something like a staircase kit.

I still did not check the script here but I will do soon. Today Im just a bit busy with other things.

But I will check out as I defenetly need a rotation on root.

Link to comment
Share on other sites

This one will rotate it at 90 degrees as you can see, <0,0.0,90> but it still does it from the root of the pole. Prehaps you could add it, copy it up as many times as need, do not click bottom one, click second floor once, third floor twice etc, unlink and delete all poles and add one big pole to go up all the the floors again to save prims, (?). Timer is off on it now.

rotation rot_xyzq;

default
{
    state_entry()
    {
        vector xyz_angles = <0,0.0,90>; // This is to define a 90 degee change
        vector angles_in_radians = xyz_angles*DEG_TO_RAD; // Change to Radians
        rot_xyzq = llEuler2Rot(angles_in_radians); // Change to a Rotation
    }

    touch_start(integer s)
    {
        llSetRot(llGetRot()*rot_xyzq); //Do the Rotation...
        llSetTimerEvent(0);    //Time to wait between movements
    }
    timer()
    {
       llSetRot(llGetRot()*rot_xyzq); //Do the Rotation...
    }
}

  • Like 1
Link to comment
Share on other sites

Ok that sounds like what I need. I give it a try in the evening when other things are finished.

Yes after that is done I will unlink every quarter so that I can delete each pole and just add one single pole depending how high I want the staircase to be. You are right :) Indeed I must try if that will cost less prims. Im not exactly sure how the mesh behave when I add prims (PE calulation). But I will see. :)

So all in all this is the way how I can decide everytime I need a staircase, how hight I want it to be. :)

Link to comment
Share on other sites

Z is a number.  If you want it to more to 45 degrees from its zero position, type /3 45.0.  If you want it to rotate 45 degrees more than it has already rotated, type /3 45.0 more .  All rotations are around the local Z axis of the object's root prim.

Incidentally, in case it's not clear.....   I am rotating around the local Z axis (that is, the object's own Z axis), not the Z-axis of the grid.  The two will be exactly the same if the object's Z axis is pointing straight UP.  If it's not, and if you rotate around the grid's Z axis, your object's rotation will look all wonky.  Think of the difference between rotating a flagpole (plus flag) that is sticking at an angle out of a building and one that is standing vertically on the ground.

Link to comment
Share on other sites

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