|
Buckaroo Mu
Alpha Geek
Join date: 17 Oct 2006
Posts: 106
|
10-03-2007 07:55
I'm currently sitting on an odd problem that I could probably solve given enough time to dig, but I thought I'd do the forum thing and see if anyone has figured this out already. I need to llPushObject an avatar. I need the total movement applied to be approximately the same no matter the mass of the Avatar, distance to, or mass of the Prim/Linkset the script is in. Having never dealt with the physics portions of LSL (yet), I tried something simple, and didn't realize that the prim size was affecting the amount of push as well. My little test cube would reliably push me up and back about 5 meters, which is the perfect push for this application, but the other tester's floor would throw them across the region  I need to know how to compensate for: A) Avatar Mass - llGetObjectMass(llDetectedKey(x)) B) Scripted Object Mass - llGetMass() C) Distance between A and B - Power*llPow(llVecDist(llGetPos(), llDetectedPos(x)), 3) is what the wiki lists, I assume that wold be correct, but need to integrate it with A and B. Any pointers would be very much appreciated!
|
|
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
|
10-03-2007 08:25
I tried to implement the distance cubed function in a springboard a while back, eventually gave up as it was inconsistent and instead moved the prim to the centre of the avatar and then applied the push.
However, I didn't take into account the mass of the prim so that might have something to do with it.
_____________________
www.nandnerd.info http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum
|
|
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
|
10-03-2007 09:51
You should work this out on the Beta grid, where the new HAVOK 4 physics engine is being tested. Whatever you do now will probably break when that comes into the main grid.
Also, in general, I would not rely on the laws of physics from the real world. The laws of physics in SL can be quite different. That is, F might not be ma...
|