[Opensim-dev] Questions about Vehicle scripting calls

Mike Higgins mike at kayaker.net
Thu Jul 5 15:19:38 UTC 2012


     No time! No time!
     But I have thought about it a little. It seems to me that the 
problem is that gravity and buoyancy are probably done from 
accelerations, while the linear motor is a magic device that specifies a 
target velocity. Ideally you could calculate the force of gravity, the 
counteracting force of buoyancy, and calculate a force that would result 
in the linear velocity. Sum all the forces into one and apply them to 
the object. But I don't think the physics is done in a manner that 
"realistic".
     What is SUPPOSED to happen when gravity and the linear motor are 
combined? Seeing as the linear motor specifies the end velocity, it 
should overpower (ignore) gravity. What happens in SL when you turn on 
the linear motor on a falling object? I suspect that it simply turns in 
the linear motor direction. Hopefully making a smooth turn in the decay 
time. I'll have to go do physics experiments in SL to figure out what 
they implimented.
     Then I don't know enough about the Open Simulator code to know how 
to implement whatever is necessary. Given enough time (see my first 
comment above) I could get more involved with that..

On 7/4/12 2:53 PM, Kevin Cozens wrote:
> On 12-06-08 06:15 PM, Mike Higgins wrote:
>> Then I looked in the ODEDynamics.cs code where, starting at line 663, 
>> the
>> comments from KF say "So far I have found no good method to combine a
>> script-requested .Z velocity and gravity". Then he proceeds to 
>> replace the
>> requested linear motor Z value with the current Z velocity of the body.
>> Since a balloon is buoyant, the Z of the current velocity is always 0 
>> and
>> this looks like it is probably the problem. It always resets the linear
>> motor Z value to 0 here. I'll have to think about what should be done 
>> here...
>
> Nice catch, Mike. Have you had time to investigate this any further?
>





More information about the Opensim-dev mailing list