Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Union Micro Vendor - Change rotation of object within

Tifosa Twang
Registered User
Join date: 26 Mar 2006
Posts: 25
10-01-2006 18:30
Hi there! I'm working with the Union Micro Vendor, a vendor that rezzes objects (i.e. furniture.) I've managed to get it working properly...1 problem, the object that the vendor rezzes is upside down (it's a coffee table whose legs are in the air.) I've tried manually turning it around, but this doesn't seem to work. I tried playing around with the rez position, but this doesn't work. I looked in the script for some reference to rotation, but don't see one. Anyone had this problem and know how to solve?

Much appreciation for any help!

Thanks,

Tif
Sam Brewster
Registered User
Join date: 20 Feb 2006
Posts: 82
10-01-2006 19:07
The rotation of the parent prim where you placed your holoscript affects the placement and orientation of the object. For example, you place the script in a table leg that is rotated 90 degrees on the x axis during the orignal build. THe script will display that prim at 0 rotation, hence a sideway table.

ONe fix is to edit the parent prim so that it's rotation is 0 degrees on each axis. Another fix is to edit the holo model script to add rotation offset info so that the model is corrcetly rotatated. This method requires some scripting experience. Last, (and this is what I've done with many of models due to the ease and speed of implementation) is to create a small prim that is rotated to 0 degrees on every axis. Place your holo script in this prim, link it to your build as the parent link, and make it 100% invisible* (see note), and presto your table rotates at the correct angle.

*NOTE: Setting texture transparency on the edit menu only allows you to set it to 90% and a small outline of your invisible prim will be seen. The way to make a prim 100% invisible is to put the following funtion in your script:

llSetAlpha(0.0 , ALL-SIDES);

This Function makes the prim completely invisible.

just place it in the scripts state_entry event.


Here's a very basic script that when dropped in any prim will make it 100% invisible:

CODE


// Drop in prim to make prim 100% invisible
// By Sam Brewster
// Released into the public domian.


default
{
state_entry()
{
llSetAlpha(0.0 , ALL-SIDES);
}
}




Good Luck,

Sam
_____________________
Tifosa Twang
Registered User
Join date: 26 Mar 2006
Posts: 25
Thank you!
10-02-2006 09:37
Sam,

Makes perfect sense. I created the objects when I was fairly new to building and made it upside down so that I could line up the edges of the legs properly ;) I'll try the script below, but may just sell the tables stand alone (outside of the rez vendor) and only put items I've made upright in it from now on.

Thanks for clearing up the mystery! Much appreciated!

Tifosa
Stylez Gomez
Union Micro
Join date: 4 Jun 2004
Posts: 146
10-03-2006 21:16
Yep, Sam hit the nail right on the head with his explanation. A (much briefer) explanation can be found in the FAQ here and I've also posted a link to this thread. :)
_____________________
Tifosa Twang
Registered User
Join date: 26 Mar 2006
Posts: 25
Thank you!
10-04-2006 12:38
Thanks guys, I'll try this tonight and see if I can get it right! Much appreciated!