Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Cancelling gravity, naive physics question

Adam Ramona
Registered User
Join date: 5 Jan 2005
Posts: 56
08-17-2007 20:03
My understanding based on the wiki http://www.lslwiki.net/lslwiki/wakka.php?wakka=mass is that SL gravity is <0,0,-9.8> m/s2. Therefore, I perhaps naively assumed that I could cancel gravity and have a floating, stationary physical object by using this:

CODE

float mass = llGetMass();
llSetForce(mass * (<0,0,9.8>), FALSE);


It kinda works, but the object slowly falls down to earth. However, increasing the Z component of the vector simply makes it rise. Could someone explain if it is possible to have a floating, stationary object?
Shadow Subagja
Registered User
Join date: 29 Apr 2007
Posts: 354
08-17-2007 20:22
look at llSetBuoyancy(); You can modify the constant force on an object this way.
Scott Tureaud
market base?
Join date: 7 Jun 2007
Posts: 224
08-17-2007 23:25
yep llsetbuoyance work to. even as an attachment to your avatar will make your avatar 'inherit' it.

as for stationary you could have it move to the same location over and over. but then it's likely to go back and forth like a pendulum.
Adam Ramona
Registered User
Join date: 5 Jan 2005
Posts: 56
08-18-2007 04:36
llSetBuoyancy works just great, thanks very much Shadow and Scott.
Lyn Mimistrobell
(waiting)
Join date: 11 Jan 2007
Posts: 179
08-18-2007 05:55
I remember from "huge prim" discussions, that gravity in SL is not fixed, but depends on the objects around you... I recall that in theory you could reverse gravity in a region thru using enough huge prims (possibly they need to be physical)... I know it's not any help and you've already fixed it, but it maybe explains why your initial idea which should work, didn't.