Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Query abt physics..

Master Bartlett
Registered User
Join date: 10 Oct 2006
Posts: 6
10-22-2006 00:23
Hello (first post!)

There's a feature of the physics engine I don't get. I have the following script fragment:

touch_start(integer total_number)
{
llSay(0,"Touched";);
while (llGetEnergy()<1.0)
llSay(0,"Waiting for energy";);
llApplyImpulse(llGetMass()*<0,0,10>, FALSE);
}

on a physical sphere 1 meter in size. When I touch the sphere it usually leaps in the air as expected, with what looks like an initial velocity of 10 vertically, but sometimes it just does a little jerk. I thought it might have lost 'energy', so I put that loop in - but in fact it never waits for energy. I guess something else is affecting it - but what?
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
10-22-2006 02:02
I'd have to guess that its a 'bad' return from llGetMass() giving you a much smaller mass than 'normal'. May be a lag issue but I wouldnt know for sure.
Master Bartlett
Registered User
Join date: 10 Oct 2006
Posts: 6
10-22-2006 04:23
llGetMass() is not th eproblem - I get the same effect with a constant impulse size. Usually it jumps but sometimes it just does a little hop. I think it is a lag effect but I don't exactly know how