Jump to content

Snippy Yifu

Resident
  • Posts

    52
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

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

  1. I don't know the answer to your question. I myself had some trouble in the past with this event being triggered "randomly" when more than one objects are being added/removed. What I did was simple, maybe this can help you. changed(integer change) { if (change & CHANGED_INVENTORY) { llSetTimerEvent(2); } } timer() { llSetTimerEvent(0); //do stuff here } So this triggers whatever you need to happen 2 seconds after the inventory last changed. And since this timer is reset to 2 seconds everytime the inventory is changed, it disregards how many times the inventory is changed and only triggers once, after 2 seconds. Hope it makes sense.
  2. Hello I have a prim being rezzed by a rezzer, and then asked to move around given global coords (calculated from local coords of the rezzer). I've created this snippet for the moving prim to convert the global coords to keyframed position and rotation. But something is odd with the rotation. Sometimes (depending of the rezzer's rotation) the moving object ends up upside-down (inverted z- world axis). rotation NormRot(rotation Q) { float MagQ = llSqrt(Q.x*Q.x + Q.y*Q.y +Q.z*Q.z + Q.s*Q.s); return <Q.x/MagQ, Q.y/MagQ, Q.z/MagQ, Q.s/MagQ>; } uMoveTo(list keyframes) { iTarget = llTarget((vector)llList2String(keyframes, -3), 0.05); vector offset = llGetPos(); rotation orientation = llGetRot(); vector newFramePos; rotation newFrameRot; integer i; integer length = llGetListLength(keyframes); for (i = 0; i < length; i += 3) { newFramePos = (vector)llList2String(keyframes, i) - offset; newFrameRot = NormRot((rotation)llList2String(keyframes, i+1)) / orientation; offset += newFramePos; orientation *= newFrameRot; keyframes = llListReplaceList(keyframes, [ newFramePos, newFrameRot, (float)llList2String(keyframes, i+2) ], i, i+2); } llSetKeyframedMotion(keyframes, [ ]); } Keyframes is giving as a strided list of strings (position, rotation, time). I'm clueless with rotations and ends up guessing what to do with them all the time ... so any help would be greatly apreciated :) Thanks
  3. Thanks for the help guys. That last snippet from Dora is doing exactly what I needed (I think lol). And just to make sure I understand (I like to understand the code I'm using ): llVecNorm on the velocity returns the directional vector without its speed element, then you add a to .z for the correction on the z axis, and you finally add the speed back (llGetMass() making it constant whatever the size of the object). Is that right ?
  4. Thanks, but this would only work if the object is facing toward the direction it's going to, which is not always the case. I know you're trying to help, and it's probably my fault, not explaining myself correctly All I need to know is the math that would allow me to - take the current velocity boostedVel = llGetVel(); - adjust the magnitude (speed) of that vector to a preferred number ? - adjust its direction so the object keeps going towards the same direction but slighly higher on the z axis ? - apply the impulse to adjust velocity llApplyImpulse(boostedVel, FALSE); Does it make more sense now ?
  5. If I do that it will push the object in the same direction, but also at the same speed it came from. I want to boost its velocity (hence the post title "How to increase velocity") and slightly raises it's trajectory on the z axis.
  6. If I pick a random vector, like <2,2,2>, it will always push the physical object towards that direction. I need to keep the original direction of the object and just give it a little boost (with slightly higher boost on the z axis so it raises). It's like a ball that you would kick: Keep the direction the ball took, but add some force to it to simulate the strengh it got kicked with.
  7. Hello, I'm lacking knowledge in math and vectors :P I want a physical object to get a "boost" when hitting a particular object but keeps it's current direction , so the first object would get some more speed but also raise in its height level a bit more too. So I'd get something like this: collision_start(integer num) { vector currentVel = llGetVel(); vector boostedVel = ??? llApplyImpulse(boostedVel, FALSE); } This is extremely simplified, I'm just stucked on the math behind it.
  8. Hello, I'm lacking knowledge in math and vectors :P I want a physical object to get a "boost" when hitting a particular object but keeps it's current direction , so the first object would get some more speed but also raise in its height level a bit more too. So I'd get something like this: collision_start(integer num) { vector currentVel = llGetVel(); vector boostedVel = ??? llApplyImpulse(boostedVel, FALSE); } This is extremely simplified, I'm just stucked on the math behind it.
  9. Hello, Since the later versions of viewer 2.x, and now with viewer 3.x Second Life freezes for a minute when I log in, and crashes randomly everynow and then. I can do with the freezes, but the crashes are very annoying. I looked up in my crash reports, and it's always the same error that comes up when the client crashes: 2011-09-16T13:15:30Z WARNING: ll_apr_warn_status: APR: The system cannot find the file specified. 2011-09-16T13:15:30Z WARNING: LLAPRFile::remove: Attempting to remove filename: C:\Users\...\AppData\Roaming\SecondLife\logs\SecondLife.exec_markerI would really apreciate any help about fixing this issue. My SL and PC specs: Second Life 3.0.0 (238864) Aug 18 2011 13:05:38 (Second Life Release) CPU: Intel(R) Core(TM) i5 CPU 650 @ 3.20GHz (3192.02 MHz) Memory: 6072 MB OS Version: Microsoft Windows 7 64-bit (Build 7600) Graphics Card Vendor: NVIDIA Corporation Graphics Card: GeForce GT 320/PCI/SSE2 Windows Graphics Driver Version: 8.17.0012.7533 OpenGL Version: 3.3.0 libcurl Version: libcurl/7.21.1 OpenSSL/0.9.8q zlib/1.2.5 c-ares/1.7.1 J2C Decoder Version: KDU v6.4.1 Audio Driver Version: FMOD version 3.750000 Qt Webkit Version: 4.7.1 (version number hard-coded) Voice Server Version: Vivox 3.2.0002.10426 Built with MSVC version 1600 Packets Lost: 0/7,917 (0.0%) Thanks in advance.
  10. To me this is still a bug, or at the very least, a big flaw in the design of PE calculation. The other day, I was making a skybox, with a little garden. I wanted the garden part to look more realistic and natural by adding a sculpty to it that would just "simulate" natural ground uneveness. So I had 2 sculpts, linked to 1 normal flat box prim. PE: 3prims. So far so good. But then I decide to set the Physic Shape Type of the sculpties to none, so the user can have his two feet on the flat box. At that point, PE was 40 prims... So in the end, an object that is less weight to the physic engine cost more in PE... and you're telling me that's not a bug ?
  11. Hi everyone. I tried to use the method described here: http://wiki.secondlife.com/wiki/LSL-Shared_Media_Communication The goal is to have a webpage pulling information from an object inside SL without having to reload the page (AJAX style :P). Because of AJAX cross-domain restriction, as explained in the wiki page I linked above, one work around is to use PHP to proxy the http-request. The problem I'm having is ... it doesn't work. The HTTP_REQUEST event in the SL object is never triggered if the request is made through that php proxy. It looks to me as if the cap server is just ignoring the request. The php code works fine tho for any other non-sl urls, and my sl-urls works fine when accessed normaly (not through the php proxy), it's just when you put the two together that it doesn't work. Any idea/input on the subject would help greatly, thanks.
  12. Gavin, you can't compare Apple with Linden Lab, that's like comparing McDonald to your local diner. They don't have the same ressources, money, amount of employees, etc... Like Prokovfy said, we have to remember that in fact builders and the like are only a very small community compared to the rest of the users. When you look at it this way, LL is already giving us a lot of attention, and we're getting more and more of it. I see a lot of people complaining about not being listen to, but how many of you participate to the different open office hours and forums that LL is having weekly? Linden Lab explicitly said viewer2 had been designed mainly for new users, and even if some may argue that was a bad decision, it however explains why viewer2 is so different than 1.23 and why it's not suited best for content creators. Yet, like I said, LL is doing some efforts right now to listen to us, so let's not blow this chance by just ranting and complaining on how they should have done this and that, but let's focus on the future. What can be done now? How can we help? Let's be constructive
×
×
  • Create New...