Jump to content

gemmawelsh

Resident
  • Posts

    9
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. That did the trick, thank you I hadn't even noticed it had changed from PRIM_ROT_LOCAL to PRIM_ROTATION, you are a genius xx
  2. If it is not possible I will make my root prim transparent and zero rotate it before the spin and have my mat and arrow both as childs
  3. Sadly I tried that already and it didn't work for me but I was sure I read somewhere that was what I am supposed to do.
  4. Thank you so much for all the scripts and additions, I now have my arrow (child) spinning on my mat (root) using a combination of the above work. However my final request (I promise lol) when using Wulfie's script and the updates from Quintessa, if I turn my mat (root) around it's z so it is no longer 0,0,0 then the arrow no longer stops to point at the chosen avi? Do I have to minus or divide by llGetRootRotation somewhere? I am sure I read on a post that is how to overcome this but no matter what I try, it is not working. Thank you both again, so much.
  5. Wow this is almost perfect. (nobody is ever happy, right lol) Two things I cannot fathom: 1: The initial list of gMod=30 seems to have too much info for a list to hold as it cuts off at 25 entries (I think) 2: Cannot seem to make my arrow spin clockwise, only anti clock. So, I tried a routine to reverse the gRots list, but didn't work properly (for me at least) It reversed the list, but upon spinning the arrow, well...didn't happen the way I expected. I assumed having the list of positions in reverse, the arrow would indeed turn (clockwise) through the reversed list. Seeing as the initial gRots list works anti-clock. Everything else I fully understand and is gonna be very useable indeed. Oh yeah, almost forgot, I moved the Default obtaining gRots to after the touch. This way, if the root prim is turned before it is clicked again, the rotations will work properly. Having them at default only worked if the root prim was never rotated. I cannot thank you enough for your help with this. xx If I don't seem to reply today for any updates you may add, it is because the forum now tells me:
  6. I tried that a couple of days ago but it is not really compass points I need, what I need is actual rot points to make my arrow stop at the avatar, which I will use the value from: rotation xyz = llRotBetween(<1.0,0.0,0.0>,llVecNorm(<gvTarget.x - gvPos.x, gvTarget.y - gvPos.y,0>)) So instead of a list of compass points, I'll have a list of (prim) xyz rotations. 0, 315, 270, 180 etc. and try to stop it spinning when it is (close to) the avi rot xyz Whether I will manage is another story taking into account clock or anti-clock and slow down speed! I'll sleep on it for tonight as it's late here. Again thank you for your ideas and examples, appreciated indeed.
  7. I think that is probably very logical solution. As you stated, the llSLPPF spin in my script is not actually giving same results each full 360 spin as I thought it would do I am thinking of a list of compass points now and going through the list each timer call, so the prim perhaps points to next in the list and so on? And for anti-clock, I could reverse the list perhaps. Your ++gAccumulator; uPointDir(gAccumulator*gSpeed); I will try to get my head around also. And I'll look into llAtan also Thanks for all your help.....so far as I felt my head would explode soon lol
  8. Thanks for the script and your time 👍 And yes I need my arrow to spin like a bottle around the z axis only (like a bottle) But I should have mentioned about not using llTargetOmega and instead use llSetLinkPrimitiveParamsFast as I find llTargetOmega very stubborn, as you pointed out. Also the script I am using from my original post above, the spin value is changed in the timer using --spin which starts to slow my arrow down after a few turns. Nice effect. So basically I can have my arrow rotate clockwise or anti-clockwise. It spins fast then gets slower and slower to a stop, but I need it to continue rotating in the same direction until it reaches the (found) avatar. I guess kinda like spin the bottle, but instead of it stopping and choosing "Kiss", "TRUTH OR DARE" from it's base, (ala the old original spin the bottle) I want mine to choose an avatar instead. Your look at routine might be helpful I am at the hair pulling stage now trying to work this all out lol
  9. So what I have is a child prim (a flat arrow on the ground, child prim. Root prim invisible at 0,0,0) The Arrow (A bit like the twister game perhaps?) I have spinning round and slowing down. llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_ROT_LOCAL, llGetLocalRot() * llEuler2Rot(<0., 0., spin> * DEG_TO_RAD)]); The above in a timer inside the child (arrow) prim. All good and well, it spins as it should. However, I want it to spin round perhaps two times then find an avatar and spin and stop so it then points at the avatar. I have used a sensor to choose a random avi, that's done. Grab their pos and work out rotation for the arrow to be able to point to the avi. Something like: vector target = llDetectedPos(chosen avi); vector gvPos=llGetPos(); //object position float gfDistance=llVecDist(<gvTarget.x,gvTarget.y,0>,<gvPos.x,gvPos.y,0>); llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_ROT_LOCAL, llRotBetween(<0.00001,0,0>,llVecNorm(<gvTarget.x - gvPos.x, gvTarget.y - gvPos.y,0>)/llGetRootRotation()) ]); Which is fine, if I wanted the llRotBetween, but I do not as it will make the arrow spin either clockwise or anti, as it works out the shortest distance! Also, I tried taking the value of the above as a Rotation and during the arrow spin, does Rotation == llGetRot() (after doing euler stuff degtorad to get the rot.z) However, the chances of the original spin's rot.z ever matching the above rot.z is limited as each spin will have a different value. Pulling my hair out! Headaches! So, here is where I need help. Arrow spins at least 2 times round (360 x2)? Finds an avi then keeps spinning in same direction then stops to point at chosen avi. Oh and is it possible no matter which rotation the root is in to still have this work? As I don't want to have to deal with that too! Sounds simple on paper and probably is, but after messing about with euler and rotations things are getting messy! Thank you for any tips or help you may give
×
×
  • Create New...