Jump to content

Dora Gustafson

Advisor
  • Posts

    2,120
  • Joined

  • Last visited

Everything posted by Dora Gustafson

  1. Works for some numbers but not small and big numbers This method assumes you always get 6 decimal places when you cast a float to a string :smileysurprised::smileyvery-happy:
  2. I agree! The server performance degrade over time. I don't know why but it does and we are best served with regular restarts :smileysurprised::smileyvery-happy:
  3. Look a few posts down: Attempting-to-figure-out-a-function :smileysurprised::smileyvery-happy:
  4. With the llCastRay() you could do something like what you describe :smileysurprised::smileyvery-happy:
  5. Probably:smileysad: It is a pain in the a.. that a few brainless morons can do that to a lot of good residents. Spammers! get lost! :smileysurprised::smileyvery-happy:
  6. Is the Second Life Wiki again closed for resident contributions? How long will it stay that way? :smileysurprised::):smileyvery-happy:
  7. Push the person in the direction of the vector pointing from you to the person. You must apply a push for each person. :smileysurprised::smileyvery-happy:
  8. Look for normals in Blender. The face normals must point to the side you want to see. Blender has tools for showing normals and for recalculating and flipping normals :smileysurprised::smileyvery-happy:
  9. A quick shot. If the mesh is textured try to change alpha from blend to mask :smileysurprised::smileyvery-happy:
  10. Rolig is right about residing scripts can overwrite your setting Though it sounds like what you have is a prim property camera setting which can not be modified while you sit so it should be all right to overwrite it. As a start change CAMERA_BEHINDNESS_ANGLE to something bigger like 180° and see if that helps :smileysurprised::smileyvery-happy:
  11. Slightly: vector V=llRot2Left(gLinkRotation); // gLinkRotation is the child's global rotation float AzAngle=PI_BY_TWO+llAtan2(V.y, V.x); // Fixed offset for child's -y 'forward' rotation Azimuth=llEuler2Rot(<0.0, 0.0, AzAngle); You don't need to perform a dot product to get the vector components :smileysurprised::smileyvery-happy:
  12. Try this: rotation gr = llGetRot();vector y = llRot2Left( gr);vector vertical = <0.0, 0.0, 1.0>;float cosinus = y*vertical;float angle_to_vertical = llAcos( cosinus);float angle_to_horz_plane = PI_BY_TWO - angle_to_vertical; Angles in radians. This is not debugged I will trust you to do that :smileysurprised::smileyvery-happy:
  13. A semicolon to end line 2 is missing :smileysurprised::smileyvery-happy:
  14. llOwnerSay() talks to the owner specifically More clearly it sends messages to the viewer Since scripts run on the server they can't intercept messages send by LLOwnerSay() :smileysurprised::smileyvery-happy:
  15. I agree it will be shorter to vector pos = llList2Vector( llGetObjectDetails( llList2Key(avatars,i),[OBJECT_POS]),0); In this case we know for certain the list element is of type vector so there is no reason to take the detour with getting a string and then cast it. It even saves accuracy not to have a string in between Also we can get the key directly from the llGetObjectDetails list, no need to get it as a string and then cast to key :smileysurprised::smileyvery-happy:
  16. It couldn't be more simple first note that Acos( 1) == 0° and Acos(-1) == 180° Acos always is a positive angle in [0,180]° If you only want to accept avatars within ±5° you could write this code in LSL (LSL uses radians) if ( RAD_TO_DEG * llAcos( dp) < 5.0 ){ // accept avatar} dp is the dot product from a previous post the very same in condensed form: if ( dp > 0.9962 ){ // accept avatar} 0.9962 equals cos(5°) :smileysurprised::smileyvery-happy:
  17. The vector dot product is your friend Get your position and rotation ( provided your script is in the root of an attachment) vector mypos = llGetPos; rotation myrot = llGetRot(); Get position of the avatar you test It looks like you already have the variable pos One vector is vector avdir = llVecNorm( pos - mypos); The other vector is vector lookdir = llRot2Fwd( myRot); The vector dot product is float dp = avdir * lookdir; // (note that the two vectors avdir and lookdir are unit vectors) dp lays in the range -1 <= dp <= 1 When dp == 1 you are looking exactly at the avatar and when dp == -1 you look the opposite direction The angle between avdir and lookdir is float angle = llAcos( dp); Use this angle to select avatar :smileysurprised::smileyvery-happy:
  18. This is correct, it will always be a tiny bit over the center You can cut the prim in half so that the center will appear to be on the side Make that side the 'under' side and scale from there by changing the Z dimension :smileysurprised::smileyvery-happy:
  19. when you edit a prim (in the mode where it can be moved) you see three axis: X(RED), Y(GREEN) and Z(BLUE) When the edit mode is Local (NOT World) these are the axis of the prim:) :smileysurprised::smileyvery-happy:
  20. The way to place hover text is not exactly like you say You see hover text placed over the center of the prim no matter how you turn and move the prim How much the text is over the center is determined by the prim's Z dimension So in a hud with the Z axis perpendicular to the screen you can change the text position by changing Z dimension without any visible change in size of the hud :smileysurprised::smileyvery-happy:
  21. I know one and only one way to get a child prim's UUID without (chat) communication That is by llCastRay It won't even work if the child prim has physics shape type set to None Keep searching :smileysurprised::smileyvery-happy:
  22. Connection is wired. I can't take off either. There is no problem on the Singularity viewer
  23. When I change outfit the old baked clothing stays on until I relog Is there a way to rebake without logging out and logging in? I am on the newest LL standard viewer
  24. NiceCo wrote: This is the "LSL Scripting" forum. Shouldn't you be asking in a JSON forum? This is not a JSON forum. It is proper:) LSL has JSON functionality http://wiki.secondlife.com/wiki/Json_usage_in_LSL :smileysurprised::smileyvery-happy:
×
×
  • Create New...