Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Rezzing object so its point away froma avatar

Philbert Susa
Registered User
Join date: 25 Jan 2007
Posts: 4
08-05-2009 20:00
I have this dart, and it is tossed from an attachment. I haven't a clue so it rezzes pointing away from me.
Cerise Sorbet
Registered User
Join date: 8 Jun 2008
Posts: 254
08-05-2009 20:29
Here is something to begin on.

CODE

// make the arrow point east, get its rotation from the editor. put the xyz degrees in gArrowEast.
vector gArrowEast = < 0.0, 90.0, 0.0 >; // make a default cone point east

default
{
touch_start(integer total_number)
{
llRezObject
(
llGetInventoryName(INVENTORY_OBJECT, 0), // the first object in inventory
llGetPos() + (< 1.0,0,0.5 > * llGetRot() ), // 1 meter in front, 0.5 meter higher than pelvis
ZERO_VECTOR, // it is a sleepy arrow. it does not move.
llEuler2Rot(gArrowEast * DEG_TO_RAD) * llGetRot(), // turn the east rotation to same direction as the avatar
0
);
}
}