/////////////////////////////////////////////////////////////////////////// // Copyright (C) Wizardry and Steamworks 2011 - License: GNU GPLv3 // // Please see: http://www.gnu.org/licenses/gpl.html for legal details, // // rights of fair usage, the disclaimer and warranty conditions. // /////////////////////////////////////////////////////////////////////////// fireNova(key targetKey) { float initialVelocity = llGetRegionFPS()/2.0; vector target = llList2Vector(llGetObjectDetails(targetKey, [OBJECT_POS]), 0); vector origin = llGetPos(); float distanceDelta=llVecDist(,); float valSin = 9.81*distanceDelta/llPow(initialVelocity, 2); if(valSin < -1 || valSin > 1) return; rotation rotationDelta = llRotBetween(<1,0,0>,llVecNorm()); llRezObject("[K] Nova", llGetLocalPos(), llVecNorm(<1,0,0>*rotationDelta)*initialVelocity, rotationDelta, 0); } default { touch_start(integer num) { fireNova(llGetOwner()); } }