Jump to content

Veity

Resident
  • Posts

    1
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

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

  1. Hey there, new to the forums so im not to sure if this is the place to post this but thought i'd try anyway. I am a regular programmer but new to lsl scripting. I am trying to create a script to animate npc's so far its very simple, it just moves and rotates an object (in this case the upper part of an arm). The problem is im having difficulties getting the rotations to work. Ive created a test where the rotation should deliberatly not change however when i touch the object in question it rotates slightly and i cannot figure out why, any help would be greatly appreciated :-) vector startPosition; vector endPosition; rotation startRotation; rotation endRotation; string objectState; default { state_entry() { startRotation = llGetRot(); //endRotation = llEuler2Rot(<5, 68, 327> * DEG_TO_RAD ); startPosition = llGetPos(); //endPosition = <107.45774, 138.46310, 3801.77515>; objectState = "start"; } touch_start(integer total_number) { if(objectState == "start")// { llSetPos(startPosition); llSetRot(llEuler2Rot(<startRotation.x, startRotation.y, startRotation.z> * DEG_TO_RAD )); objectState = "end"; } else if(objectState == "end") { llSetPos(startPosition); llSetRot(startRotation); objectState = "start"; } llSay(0, objectState); } }
×
×
  • Create New...