Jump to content

Search the Community

Showing results for tags 'rotation'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • People Forum
    • Your Avatar
    • Make Friends
    • Lifestyles and Relationships
    • Role Play
    • General Discussion Forum
    • Forums Feedback
    • Missed Connections
    • Second Life Education and Nonprofits
  • Places and Events Forum
    • Favorite Destinations
    • Upcoming Events and Activities
    • Games in Second Life
  • Official Contests, Events & Challenges
    • Challenges
    • Contests
  • Creation Forum
    • Fashion
    • Art, Music and Photography
    • Animation Forum
    • Bakes on Mesh
    • Environmental Enhancement Project
    • Machinima Forum
    • Building and Texturing Forum
    • Mesh
    • LSL Scripting
    • LSL Library
    • Experience Tools Forum
  • Technology Forum
    • Second Life Server
    • Second Life Viewer
    • Second Life Web
    • General Second Life Tech Discussion
    • Mobile
  • Commerce Forum
    • Merchants
    • Inworld Employment
    • Wanted
  • Land Forum
    • General Discussion
    • Mainland
    • Linden Homes
    • Regions for Sale: Full Private Island
    • Region for Rent: Full Private Island
    • Regions for Sale: Homesteads
    • Region Rentals: Homestead
    • Parcels for Sale: Mainland
    • Parcels for Rent: Mainland
    • Wanted: Full Private Island
    • Wanted: Homesteads
    • Wanted: Mainland
  • International Forum
    • Deutsches Forum
    • Foro en español
    • Forum in italiano
    • Forum français
    • 日本語フォーラム
    • 한국어 포럼
    • Fórum em português
    • Forum polskie
    • المنتدى العربي
    • Türkçe Forum
    • Форум по-русски
  • Adult Content Forum
    • Highlight Upcoming Events
    • General Discussion
    • General Announcements
  • Answers
    • Abuse and Griefing
    • Account
    • Avatar
    • Creation
    • Inventory
    • Getting Started
    • Controls
    • Land
    • Linden Dollars (L$)
    • Shopping
    • Technical
    • Viewers
    • Everything Else
    • International Answers


  • Commerce
  • Featured News
  • Inworld
  • Tools and Technology
  • Tips and Tricks
  • Land
  • Community News


  • English
  • Deutsch
  • Français
  • Español
  • Português
  • 日本語
  • Italiano
  • Pусский
  • Türkçe

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me

Member Title

  1. i have a prim with sensor which can follow me when i call it ,it uses RotLookAt to look in the same rotaion of my AVI but it comes with its back if i look at it , so i used a rotation offset in z by 180 degree to make it comes to me but if i call it while my back to this prim ,it comes with back cant solve this anyone can help i appreciate this example will be used for pet cat this is script in object : //// rotation rot_xyzq; oppisiteRot() { rotation rot = llDetectedRot(0); vector xyz_angles = <0,0,180>; // This is to define a 1 degree change vector angles_in_radians = xyz_angles*DEG_TO_RAD; // Change to Radians rot_xyzq = llEuler2Rot(angles_in_radians); llRotLookAt(rot*rot_xyzq, .1 , 1); } default { state_entry() { llSetStatus(STATUS_PHYSICS, TRUE); } touch_start(integer num_detected) { vector pos = llGetPos(); // Look for owner within 20 meters in 360 degree arc every 1 seconds. llSensorRepeat("", llGetOwner(), AGENT, 20.0, PI,1.0); } sensor(integer total_number) { oppisiteRot(); vector pos = llDetectedPos(0); // Offset back one meter in X and up one meter in Z based on world coordinates. vector offset =<-1,0,1>; // offset = offset*llDetectedRot(0); //Adding this line will orient the follower relative to the owner's position. pos+=offset; llMoveToTarget(pos,0.4); } }
  2. Hi! I am decent at scripting, but have a blind spot the size of Jupiter when it comes to rotations. I have a scenario where I have a flat prim on the ground (basically an invisible doormat), where a collision triggers a bit of chat to the agent. No biggie. However, I need it to respond differently depending on whether an avatar is moving in line with or contrary to the prim's local "forward" axis (x-axis in my test prim). After some testing, I figured I could theoretically do this with the rotation difference between the prim and the avatar. Depending on the global quadrant the prim is facing (and the direction the avatar is facing when walking), this is (in vectors) either <0.0, 0.0, 0.0> or <180, 0, 0>. This would basically cover scenarios 1 and 2 below where you move forward with W, with the camera position behind you. Trick is that it's also possible to move "backwards", by which I mean pressing the S, to that your avatar is facing the camera. (I'm leaving aside, for the moment, that an avatar can cross left-to-right or right-to-left as well) I also get the feeling that my lack of trigonometry skill is causing me to over-complicate things. Can someone point me in the right direction (pun totally intended) on how I can get this to work robustly? I attached an image detailing my four scenarios.
  3. First of all I apologize if I have posted this in the wrong spot. I am trying to use a poseball and everytime I sit on it I end up sideways or upside down. I'm sure there is a way to rotate I just can't figure it out. Thank you!
  4. Hi everyone I have been posting in LSL scripting groups hopeful for a solution and am starting to believe we are loosing a generation of scripters that i am supposed to fill their shoes one-day. My problem is with a rotation I am using the following script from an brilliant person on LSL who has moved onto other ventures. This was her creation . a friend Zambe made this gif for me showing what i require it to do: https://gyazo.com/055061a745dd16534dad968c9a6943f9 The problem is that upon asking several key scripters they all returned what i already had , which sequentially reads the position of an object and adds a rotation to it. This is unhelpful as one cal loose track of rotation easily and the only answer was to capture the previous rotation angle and move forward with next angle by deleting the previous . This would work but is no rotation solution I feel you should be able to set a llRotUp() option on the pink axis and then move from this ZERO_ROTATION to a new absolute angle now this problem is compounded by two boxes which have to stay synced to each other and both need adjustment as below: float rotClickAngle = 5; do_rotate(){ list L = llGetLinkPrimitiveParams(link_axis,[PRIM_ROT_LOCAL, PRIM_POS_LOCAL]); rotation rotRoot2Axis = llList2Rot(L,0); vector posRoot2Axis = llList2Vector(L,1); vector axisAxis=<0,0,1>*rotRoot2Axis; rotation rotClick_inRootFrame = llAxisAngle2Rot(axisAxis, rotClickAngle *DEG_TO_RAD); // for body. L = llGetLinkPrimitiveParams(link_box1,[PRIM_ROT_LOCAL, PRIM_POS_LOCAL]); rotation rotRoot2Body = llList2Rot(L,0); vector posRoot2Body = llList2Vector(L,1); rotation newrotRoot2Body = rotRoot2Body * rotClick_inRootFrame; vector offsetBody_inRootFrame = posRoot2Body - posRoot2Axis; vector newoffsetBody_inRootFrame = offsetBody_inRootFrame* rotClick_inRootFrame; //Beam. L = llGetLinkPrimitiveParams(link_box2,[PRIM_ROT_LOCAL, PRIM_POS_LOCAL]); rotation rotRoot2Beam = llList2Rot(L,0); vector posRoot2Beam = llList2Vector(L,1); rotation newrotRoot2Beam = rotRoot2Body * rotClick_inRootFrame; vector offsetBeam_inRootFrame = posRoot2Beam - posRoot2Axis; vector newoffsetBeam_inRootFrame = offsetBeam_inRootFrame * rotClick_inRootFrame; llSetLinkPrimitiveParamsFast(1,[ PRIM_LINK_TARGET,link_box1,PRIM_ROT_LOCAL,newrotRoot2Body,PRIM_POS_LOCAL, posRoot2Axis + newoffsetBody_inRootFrame, PRIM_LINK_TARGET, link_box2,PRIM_ROT_LOCAL,llEuler2Rot(<-90,0,0>*DEG_TO_RAD)*newrotRoot2Beam,PRIM_POS_LOCAL, posRoot2Axis + newoffsetBeam_inRootFrame]); } I would be grateful for some help as some day i am going to have to explain this myself :)
  5. Hello All, I have a linked prim that I am trying to rotate about an axis that is not through its origin. I wanted this to happen as smoothly as possible, but I want to make sure that the way I am attempting to accomplish this is actually not possible versus me just doing something wrong. I tried llSetKeyframedMotion, but then realized you can only use this on the root prim. I was then experimenting with llTargetOmega, but couldn't figure out how to move the axis such that it doesn't originate at the origin. My wife (the creator of this linked object) has also tried moving the origin to the required point in Blender, but after a ton of digging we've discovered that due to many reasons, this is not possible (without a complicated process to "trick" the SL uploader) when the object is uploaded into SL. Here's my question: Is it true that my only course of action here is to use a timer event and move the rotation position in increments with the method discussed in the "Rotation" page of the wiki on how to move the rotation axis ("Rotating Vectors")? Is there another method I'm not thinking of? Or am I using the previously mentioned functions incorrectly/not understanding how they work? Thanks!
  6. Hi Try as I might I have to admit that I will never understand the maths or the geometry behind anything other than 'degrees' of rotation along three axis in SL. I say this upfront in case anyone tries to explain underlaying concepts to me! Keep it simple (because I'm) stupid (when it comes to this stuff). I have a script rezzing a flattened square prim with an image on it's front-most face that rez's against a wall I have provided. I have it working so it functions no matter which compass point the wall faces. However what I'd like to do is have it's orientation on one axis randomly oriented when it rezs. Imageine a poster that might be upside down, sideways, or any other of the 360 available angles. So the bones of what I'm working with is here: It's the object's own Z axis I need to spin. Everything I try seems to cause complex interactions and rotate the prim on more than one axis. Take the first line for example. If I change any of the 4 parameters, the object will rez skewed on at least two axis. I have spent hour (and hours...) on this and would be so grateful to know at what point I can inject values between 1 & 360 to have the object still flat against the wall but rotated some - like clock hands for example. Thank you!
  7. I have a problem rotating a prim, I found some examples, but in the example, explain to rotate the prim in one of the 3 axes. I need the prim to rotate (up or down) always in front. The front would be the coordinate E on the world map and zero rotation on first rez. Thanks
  8. Angle relative to a fixed point in the world Hello, is it possible for me to find out which angle to follow to get to a fixed point in the world? Something like the image below ..
  9. Hello! a friend of mine asked me a puzzle. How to make the object rotate or move along a certain path (circle)? there will be several such objects (dancepads - one script for each pad...), but the main problem - they cannot be linked to anything! I read somewhere that it is possible to specify the coordinates and the object will move from point to point. how to do it and is there any other way? As example - solar system.
  10. Somehow I thought this would be easy, but I am still struggling with some rotation things (what's new lol). I am building a positioning HUD. This HUD needs to position me an exact distance left or right of a target-avatar. My rotation is not important (as i understood that a HUD cant rotate me after positioning). The id of the target avatar is known by using llSensor. The positioning of the target is, of course important. My question is how can I determine if I am standing somewhere left or right of my target-avatar (I can be standing in front of the or behind it), and after that positioning myself that exact distance left or right of my target? Thanks in advance for your help, Trivis
  11. Hello, I've been having problems more recently with pelvis rotations within blender & using avastar. I have made roughly over 500 animations in the past using the same program/plugin versions and I have never seen this happen before. What happens is when the pelvis is rotated with curves; the entire body of the avatar jolts once it is in SL, otherwise it looks perfectly fine in Blender. Here is what it looks like in Blender: https://gyazo.com/e745e52fc1abfad26dcec32c47c71001 and here is what it looks like once it is imported into SL: https://gyazo.com/c056342957fff3b2122b3441ab103532 As you can see, there is a major problem here, and I'm thinking maybe it's a problem with SL itself. I always export and upload in .anim format. The animation is running at 30fps (iv'e tried slower) and iv'e also tried exporting it with other settings, like; use translations.Also I had the avatar enabled with IK's set to 1.0. I even tried moving the avatar in certain positions from the origin, with still no luck. Has anyone at all got any idea why this is happening? I'm surprised no one else has reported this that I have not seen. Any input is deeply appreciated. This issue is basically showstopping my work. Versions used and tested: Avastar 1.0/Blender 2.69 and Avastar 2.5.1/Blender 2.79 Viewers tested on: Firestorm, Second Life Viewer - Kylie Remsen @ Silent Motion
  12. i know i know how to do this... sorta. but i can't seem to figure it out. okay, i'm trying to ray cast from an attachment, and i want to get the spot straight down from the center of my avatar (easy, thats llGetPos and lower the z coordinate), and "ahead" of my avatar. which i know is local pos + x, BUT... to get that in region coordinates, compared to which way my avatar is facing, i need to use (i think??) Rot2Fwd. i'm just... not sure where/how? vector fwd = llRot2Fwd( llGetLocalRot() ); vector targetPos = llGetPos() + (fwd* ht); this is from the example on the wiki page... http://wiki.secondlife.com/wiki/LlRot2Fwd it says 'to move an object 5 meters on its forward axis.' in this case i'm moving it "ht" meters on its X axis. or... not MOVING it, but getting a coordinate that is supposed to be ht meters ahead of where i am. but when i face the Y axis... i'm not getting a change in the Y axis calculation? :/ no. i changed 'ht' to 10 meters, but only the x coordinate is ever changing. it's been a long day...
  13. Hello! Is it possible to alter the script of the aviation speedometer, showing the horizontal speed in the speedometer, showing the vertical speed by rotating the texture?
  14. I came across Quaternions in Second Life and after a struggle to understand them gave up. But, after looking at this video just once (so far) an understanding has begun to dawn. So i thought I would offer it to others who have stumbled onto SL's Quaternions as a path to understanding them: Youtube, Quanta. However, I have not yet achieved Quaternion nirvana. I'm still working on transferring the above to SL and Blender implementations. But.... Progress!!
  15. Hello, please help with the script. I make a speedometer and a compass and I decided to make them square planes. Script uses llSetLinkPrimitiveParamsFast. I got this texture repeats on corners. I decided to reduce the scale a little and leave a blank space on the sides so that when rotating at the corners the texture does not repeat. But I need to set the zoom. What do I need to add to this line to make it happen? Thanks a lot for any help. if(COMPASS_PRIM) llSetLinkPrimitiveParamsFast(COMPASS_PRIM, [ PRIM_TEXTURE, 1, "32865340-5893-3e24-c4a0-b511d39246c3", <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, PI_BY_TWO]); ..................................................................... llSetLinkPrimitiveParamsFast(COMPASS_PRIM, [PRIM_TEXTURE, 0, "c6a241dd-709a-bf10-e7d0-b2bf49930d2a", <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, our_direction_angle_rad * -1]);
  16. Using the official SecondLife viewer, is there a way to set my controls so that when I press left or right to turn my avatar, they continue rotating more than 1/16th of a rotation before the rotation drastically slows down? This makes it very, very difficult to walk around.
  17. I built a mesh house all linked and I placed scripts in the doors. When the door is touched the camera moves making it appear like you were bumped. I tried changing scripts and its still doing it. I changed the doors and its still doing it. I'm so confused, I've never had this happen before in one of my builds.
  18. I have a script that I've been using on a drawbridge that works great. Then I moved the drawbridge to a new location and the bridge is reorienting itself to North - South whenever it is operated. I'm assuming something is wrong with my math in the orientation function. I'm hoping that someone can pinpoint what it is for me... thank you in advance. Here's is my orientation function that I'm using... rotation slerp(rotation source,rotation target,float amount) { return llAxisAngle2Rot(llRot2Axis(target/=source),amount*llRot2Angle(target))*source; }
  19. Hiya folks -- I have a large pendulum and am using the Dora Gustafson, Studio Dora swing script (below) from the outworlds script library. The text prims are set up and linked as such: pendulum (cube prim, tapered at the bottom), then a cylinder stretched out on z that acts like a rod and at the top, a small cube that is the root and contains the swing script. it works okay, i had to adjust the angle and the steps in the swing script to decrease the swing angle and slow it down -- well, it works mostly okay, it can be kinda jerky every now and then but I can live with that for now. What I'd like to do next is to rotate the root cube so the pendulum continues to swing but via the root, will also slowly rotate within a circular space on the ground so that if you attached a pencil to the pendulum end, it would act like a kind of spirograph. Not sure how to incorporate the rotation of the root prim into the swing script. I plopped in a target omega line of code but it didn't do anything - I'm guessing because I have no clue what I"m doing and that I read somewhere and can't find it there is a specific target omega for physical objects. (?) in an absolutely perfect world, the swing script would also randomly change the angle so that would alter the length of the path / lines. Appreciate any help. Thank you! This is the swing script: // :SHOW: // :CATEGORY:Pendulum // :NAME:Pendulum // :AUTHOR:Dora Gustafson, Studio Dora // :KEYWORDS: // :CREATED:2015-11-24 20:38:39 // :EDITED:2015-11-24 19:38:39 // :ID:1094 // :NUM:1870 // :REV:1 // :WORLD:Second Life // :DESCRIPTION: // Will swing a prim like a simple pendulum pivoting at an axis parallel to the prim's Y-axis // :CODE: // Pendulum motion by Dora Gustafson, Studio Dora 2012 // Will swing a prim like a simple pendulum pivoting at an axis parallel to the prim's Y-axis // The pivot axis will be at the top of a prim with the Z-axis pointing up // Quote from http://en.wikipedia.org/wiki/Pendulum_(mathematics) // • A simple pendulum is an idealization of a real pendulum using the following assumptions: // • The rod or cord on which the bob swings is massless, inextensible and always remains taut; // • Motion occurs only in two dimensions, i.e. the bob does not trace an ellipse but an arc. // • The motion does not lose energy to friction or air resistance. // The periode time increase with the Z dimension (the pendulum length)... // If it is too small the motion will not be well because of the time limitation with Key Framed Motions // The parameters set in the script works nice with a 3m long pendulum // If the pendulum is moved, rotated or resized the script must be reset to update the motion float angle=1.0; // max swing from resting (radians) //I CHANGED THIS TO 0.35 float steps=12.0; // number of Key Frames //I CHANGED THIS TO 48.0 float step=0.0; list KFMlist=[]; vector U; vector V; float angleU=0.0; float angleV; integer swing=TRUE; vector basePos; rotation baseRot; default { state_entry() { llSetMemoryLimit( llGetUsedMemory()+0x1000); llSetPrimitiveParams([PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_CONVEX]); basePos = llGetPos(); baseRot = llGetRot(); vector v1 = llGetScale(); float periode = TWO_PI*llSqrt( v1.z/9.81); float dT = periode/steps; dT = llRound(45.0*dT)/45.0; if ( dT < 0.11111111 ) dT = 0.11111111; v1.x = 0.0; v1.y = 0.0; v1 = -0.5*v1*llGetRot(); U = v1; while ( step < steps ) { step += 1.0; angleV = angle*llCos( TWO_PI*step/steps + PI_BY_TWO); V = v1*llAxisAngle2Rot(llRot2Fwd(llGetRot()), angleV); KFMlist += [V-U, llEuler2Rot(< angleV-angleU, 0.0, 0.0>), dT]; angleU = angleV; U = V; } } touch_start( integer n) { llSetKeyframedMotion( [], []); llSleep(0.2); llSetPrimitiveParams([PRIM_POSITION, basePos, PRIM_ROTATION, baseRot]); if ( swing ) llSetKeyframedMotion( KFMlist, [ KFM_MODE, KFM_LOOP]); swing = !swing; } on_rez( integer n) { llResetScript(); } }
  20. At first it seemed not too difficult to tackle the following problem, but in the end I did not manage to do it. Rotations are the story of my (second) life :-) The problem: I have an object consisting of several prims. When someone touches the object i would like to point one of the childprims to the avatar who touched the object. See attached picture. The rotation of (only!) that childprim only need to be done around in its XY-plane, so only a rotation around its Z-axis. Does anyone has a working solution? Thanks in advance for any help.
  21. Hello! Help, please, with particles. I have a script, but it always emits particles in one direction, no matter how I rotate the object. How to make the emission change the direction when the object rotates (attached or rezzed)? Is this difficult? Thank you! ---------+--------- The problem solved. Just had to use 'cone' instead of 'angle'.
  22. I want to make a script that makes me push the person who comes near me , I used llSensorRepeat and set range to 0.7 , But i can't figure out the position/rotation to push, I want my avi to push the person and return back , I need help how to use llPushObject(llGetOwner(), . . .) , Can't find the direction/position of my target. I used llDetectedPos(i) and llGetPos() then llVecNorm to get the normalized vector and then used that as direction but still not working good.
  23. I tend to get turned around any time rotations come into play I'm using the following code to point an objects x axis towards a target position and moving it to it via llMoveToTarget and it works just fine however I want it to actually stop .5 meters short of the actual target, can anybody point me in the right direction laughs... Next() { index++; if (index >= llGetListLength(targets)) { index=0; } target = llList2Vector(targets,index); mytarget = llTarget( target, .3 ); float dist=llVecDist(target,llGetPos()); integer speed2=6 - llList2Integer(speeds,index); llMoveToTarget( target, speed2*(dist/4)); vector pos = llGetPos(); llRotLookAt( llRotBetween( <1.0,0.0,0.0>, llVecNorm( <target.x,target.y,pos.z> - pos ) ), 1.0, .2); } }
  24. Hello! Help please who can! I need to make the object (of a supposedly cylindrical shape) to rotate at an angle of 45 degrees to the root about a constant fixed axis. As if it were a globe on a stand. Should I use this script or something like that? default { state_entry() { llTargetOmega(<1.0,0.0,0.0>*llGetRot(),0.1,0.01); } } Many many many many thanks! _________________________________________________________________ Ok i think i found an answer! This is what needed. Works well so far!
  25. I need two static buttons what can move(rotate) my prim left/right side. Maybe someone can explain to me what wrong? Thanks for your answers. Troubles: only 1 button move object. move all objects. Button: { touch_start(integer k) { llSay(11111, "Rot1"); llResetScript(); } } Root: integer count; default { state_entry() { count = 1; state p; } } state p { state_entry() { llListen(11111, "Rot1", "", "Rot1"); } listen(integer channel, string name, key id, string message) { rotation rot = llGetRootRotation(); vector euler = llRot2Euler(rot); euler *= RAD_TO_DEG; euler += <0, 0, 15>; llSay(0, (string) euler); euler *= DEG_TO_RAD; rot = llEuler2Rot (euler); llSetRot( rot ); } }
  • Create New...