Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Weapon/turret script

Hg Beeks
llGetElement(80);
Join date: 13 Apr 2006
Posts: 134
01-08-2007 00:08
I know I just posted this, but I can't remember whether I posted on the Tips or Library forum, and it's not appearing on either, so...
I'm attempting to set up a sort of turret gun for a friend of mine; I have it set up so it fires, and even switches between two barrels (Oooh.). However, llRezObject fires according to world coordinates, so having the velocity be exactly Z or X makes it so it will fire in the wrong direction if turned. I'm sure someone else has run into this problem - What's the solution?
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
01-08-2007 00:31
You are quite right and have given the answer in your question.
You need to take into account the rotation of the turret in the rez call.
Try This thread
Hg Beeks
llGetElement(80);
Join date: 13 Apr 2006
Posts: 134
01-08-2007 00:51
Fantastic. I figured it was something like that, but the whole rotation and trig stuff has always been a weakness for me. Thanks a ton.