-
Posts
916 -
Joined
-
Last visited
Content Type
Forums
Blogs
Knowledge Base
Everything posted by VirtualKitten
-
is it possible to push an object in a circle
VirtualKitten replied to VirtualKitten's topic in LSL Scripting
Can anyone help please? -
is it possible to push an object in a circle
VirtualKitten replied to VirtualKitten's topic in LSL Scripting
i have a script that pushes for magic . This works in a straight line without open collar or llKeyFrame link_message(integer sender, integer num, string str, key _key) { if (llGetAgentSize(intruder_key) == <0.0,0.0,0.0>) return; list tmp = llParseString2List(str,["|"],[]); string _name = llList2String(tmp,0); //llGetSubString(str, 0, llSubStringIndex(str,"|") - 1); vector pos = (vector)llList2String(tmp,1); vector target_relative_direction; float push = .010; target_relative_direction = pos - llGetPos(); vector target_normalised_vector = llVecNorm(target_relative_direction); string action = "Push"; if (llGetAgentSize(_key) == <0.0,0.0,0.0>) return; llPushObject( _key, ((push/100.0)*2147483647)*target_normalised_vector, link_message(integer sender, integer num, string str, key intruder_key) { } i tried llPushObject( intruder_key, ((push/100.0)*2147483647)*target_normalised_vector, <0.3,0.3,0.0>, FALSE ); using <0.3,0.3,0.3> as the angular vector but it still travels the avatar in a straight line . I don't understand these angular pushes can anyone sagest how you get an angular vector that pushes in a circle -
is it possible to push an object in a circle
VirtualKitten replied to VirtualKitten's topic in LSL Scripting
i understand Since the arclength around a circle is given by the radius*angle (l = r*theta), you can convert an angular velocity w into linear velocity v by multiplying it by the radius r, so v = rw. but not sure how to apply this to angular vector -
Hi scriptwriters and scribblers I am back with another question . Can i push an object in a circle with an angular impulse if so how do i set diameter of this circumference as an angular vector I have target_relative_direction = pos - llGetPos(); vector target_normalised_vector = llVecNorm(target_relative_direction); float push = 1; llPushObject( intruder_key, ((push/100.0)*2147483647)*target_normalised_vector, ZERO_VECTOR, FALSE ); Which pushes in a straight line on global co-ordinates . If I want to get a circle can i change ZERO_VECTOR to an angular rotation and how and what and will this be in relation to diameter of circle pushed around ? Thank you for looking
-
I also found this resource which is of interest and http://gridsurvey.com/api.php vector vP = llGetRegionCorner() / 256 + <-1,1,0>; // NW region = <-1,1,0>gkReq = llHTTPRequest("https://cap.secondlife.com/cap/0/b713fe80-283b-4585-af4d-a3b7d9a32492?var=varName&grid_x="+(string)vP.x+"&grid_y="+(string)vP.y, [], "");
- 26 replies
-
- avioding crappy experince
- teleportation
- (and 4 more)
-
I cant see the point of encrypting something you can set with perms . I just rezed something i only own and the textures are all 00000000-0000-0000-0000-000000000000 so why do this do you have to much time on your hands and why does this need protection
-
Hi everyone, Its very interesting that this map Api returns integer version of X and Y this suggests there is more that is waiting to be discovered and a reason for this representation requirement, does anyone know why please? D
- 26 replies
-
- avioding crappy experince
- teleportation
- (and 4 more)
-
@Strife Onizuka can you help please i now you as the Blind Wanderer and wonder if you could help please ?
- 26 replies
-
- avioding crappy experince
- teleportation
- (and 4 more)
-
there is scripts t do this i think i put one on here a while back
-
I am currently on the trail of the troll The Blind Wanderer I found another helpful clue left by him or her on wiki http://wiki.secondlife.com/wiki/Linden_Lab_Official:Map_API_Reference this API can be used like gkQID = llHTTPRequest("https://cap.secondlife.com/cap/0/b713fe80-283b-4585-af4d-a3b7d9a32492?var=name&grid_x=" + (string)((integer)grid.x) + "&grid_y=" + (string)((integer)grid.y) , [], ""); However i am not sure how all this interrelates yet please let me know if you find "DaBoom" and LSl or The @BlindWanderer anywhere as I am sure they have the answered way:)
- 26 replies
-
- avioding crappy experince
- teleportation
- (and 4 more)
-
hi animats , thanks for your message , I think there is differences between mainland or Linden owned land and other sims. I have notice when I try to use the script above setGlobalPos(vector globalDest) { , on wiki then my prim bangs up against the up most corner of the prim going no further. I Knocked but no one let me in . Now there is a region border on the other side of sim which I have not tried that is known to me so can I get corner add sim size the SURL local vectors. All this is good but it not addrees how the teleport are going further to another region. How is LSL doing this please? @BlindWanderer I saw your posts can you help please?
- 26 replies
-
- avioding crappy experince
- teleportation
- (and 4 more)
-
I dont understand this bit: Q: How do I convert the landmark positions (retrieved using llRequestInventoryData) to global coordinates? A: Add the dataserver's return value to llGetRegionCorner before moving; the coordinate is relative to the simulator where you made the dataserver request. Now to complicate things. Say you want to move a prim from one sim into another sim that is diagonal from it. An example situation would be calling llSetPos(<257,257,50>); from <254,254,50>. Your prim will first transfer into the sim on the x axis of the move and then into the sim on the y axis. If there is no sim on the x axis your prim will go offworld. So if you move a prim from Tan to Kissling it will go off world. But if you move a prim from Kissling to Tan it won't. -BW from https://lslwiki.digiworldz.com/lslwiki/wakka.php?wakka=BlindWanderer
- 26 replies
-
- avioding crappy experince
- teleportation
- (and 4 more)
-
i found this which is interesting https://lslwiki.digiworldz.com/lslwiki/wakka.php?wakka=GlobalCoordinate
- 26 replies
-
- avioding crappy experince
- teleportation
- (and 4 more)
-
I am going to look on OPEN GRID to see if they have anything as there must be some way
- 26 replies
-
- avioding crappy experince
- teleportation
- (and 4 more)
-
Then how is LSL calculating the maths :0 It has to be possible other with their routines could not do it:)
- 26 replies
-
- avioding crappy experince
- teleportation
- (and 4 more)
-
Someone told me there was holes between regions of unknown size. I said there must be a mathematical calculation to navigate to the one you want otherwise LL could not do it:)
- 26 replies
-
- avioding crappy experince
- teleportation
- (and 4 more)
-
Nods I am just trying to work out how the Global Grid works in real terms and how to navigate to it by prim so that i can get anywhere on a prim not using tp. I presume there must be some info out their, like the region version i gave you:) as you can triangulate with llVecDist( Can you do this with Global grid?
- 26 replies
-
- avioding crappy experince
- teleportation
- (and 4 more)
-
LOl Prof yes this is good thanks but i think global vector cords are given from llRequestSimulatoData(SURl, DATASIM_POS) in dataserver can I do some multiplication on this to work out moves to get me in region from my own global position and move me in same way I understand what you doing at boundary but it may not be adjoining the region
- 26 replies
-
- avioding crappy experince
- teleportation
- (and 4 more)
-
only moves it in same region nice guess
- 26 replies
-
- avioding crappy experince
- teleportation
- (and 4 more)
-
I am wondering as above is it possible to move a prim/link-set out of its Region to another by way of a script I found this but think it only goes to a position in the same region: _llTelePort( vector destpos) { // Compute the number of jumps necessary integer jumps = (integer)(llVecDist(destpos, llGetPos()) / 10.0) + 1; list rules = [ PRIM_POSITION, destpos ]; //The start for the rules list integer count = 1; while ( ( count = count << 1 ) < jumps) rules = (rules=[]) + rules + rules; //should tighten memory use. llSetPrimitiveParams( rules + llList2List( rules, (count - jumps) << 1, count) ); }
- 26 replies
-
- avioding crappy experince
- teleportation
- (and 4 more)
-
I think my translation of the surl might not be correct to change it to a vector i have surl SURL = "http://maps.secondlife.com/secondlife/MiddleEarth/63/207/21"; and get back vector <63.00000, 207.00000, 21.00000> is this correct
-
is it possible to use a script like this above to move prim across regions?
-
i am wondering if its easier to link the avatar to the portal and move everything portal too with a script to move a sit on a prim via jumps // This routine do the actual transport TelePos( vector destpos) { // Compute the number of jumps necessary integer jumps = (integer)(llVecDist(destpos, llGetPos()) / 10.0) + 1; // Try and avoid stack/heap collisions if (jumps > 100 ) jumps = 100; // 1km should be plenty list rules = [ PRIM_POSITION, destpos ]; //The start for the rules list integer count = 1; while ( ( count = count << 1 ) < jumps) rules = (rules=[]) + rules + rules; //should tighten memory use. llSetPrimitiveParams( rules + llList2List( rules, (count - jumps) << 1, count) ); }