Jump to content

Hitman Vendetta

Resident
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Hitman Vendetta

  1. Thank you Quintess! Can I ask you to elaborate a little in a couple of areas? Firstly, when you say rotation doesn't work well in LSL, do you mean the sort of problems I was experiencing (in OpenSim) are more or less the same story in SL too? More importantly, what are 'RLV's? @setrot'? While not understanding that expression and just going with the rest of the sentence for now - it seems an interesting (if slightly messy!) work-around. So your idea would be to create (eg) a box, sit the NPC on that, rotate the box by a known amount found previously by trial and error, to get the NPC to face the correct direction, then to delete the box and have the NPC adopt the pose that was intended all along? It's a creative solution (if I can make it work). Indeed, if I got it to work fast enough, I might be able to pull it all off while the NPC is still rezzing from it's cloud, and no one would be any the wiser
  2. Well said Rolig; I hadn't thought that through very well, had I?! However, I can re-phrase the question. How would this be achieved using pure LSL scripting? Thank you again.
  3. Hi! I've been working on a script somone put into the public domain, trying to adapt it to my purpose, which is to rez an NPC when it receives a message via a Dataserver call. Broadly, it works fine, but upon rezing, I want the NPC to adaopt the included (static) animation and to face a particular direction. It's this last part that won't work. No matter what value I put in for the Z rotation, the NPC will behave as follows: 1) It tends not to change direction at all for small (Less than about 7 or 8 degrees) increments/decrements of Z 2) Then it will suddenly change direction by an estimated 20 or so degrees. 3) it cannot be made to face any direction in between it's two jumps 4) For some values, it jumps into a wildly different direction. 5) Overall, it seems to be a toss up between only about 4 or 5 directions it will face, and none other, no matter which of the 360 degrees I try. Here's the relevant piece of code I believe. Where you see "185" in this example; that's the value I'm changing, but the results don't change as expected/intended. Clearly I'm doing something wrong here, but can anyone tell me what? if(npc_on == FALSE) { npc = osNpcCreate("", "", npcPos, npc); npc_on = TRUE; llSensor("", "", AGENT | NPC, 96.0, PI); vector xyz_angles = <1.0, 1.0, 185.0>; vector angles_in_radians = xyz_angles * DEG_TO_RAD; // Change to Radians rot_xyzq = llEuler2Rot(angles_in_radians); // Change to a Rotation osNpcSetRot(npc, rot_xyzq); osNpcPlayAnimation(npc, "My animation"); } Thank you in advance for your thoughts!
×
×
  • Create New...