Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

transition between vehicle / phyhsical

Ryder Spearmann
Early Adopter
Join date: 1 May 2006
Posts: 216
04-11-2007 22:26
Hi all...

I have a simple script that acts on a physical object like a rocket... just an upward push.
Goes up... falls down. Cool.

I decided to add it to a vehicle I have, and tried to push it as well.

With enough force, it would move upward... slowly. Then when I remove the llSetForce, the darned thing just sits there instead of falling! It's like the thing is trying to travel through molasses.

It's not acting like a physical object.

I assume that is because the vehicle parameters had already been used in it, and were somehow still acting on the vehicle.

How can I (temporarily) remove the vehicle factors... and allow the llSetForce / physics to act on it freely?

Thanks!

-Ryder-
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
04-12-2007 04:25
If it's a flying vehicle, then it might have a Buoyancy that is causing it to hover at whatever height it gets pushed to. I don't like using 1.0 like a lot seem to (makes it just 'sit' in air).

During whatever you're doing you could just use llSetBuoyancy(0.0); to make it 'fall' for whatever length of time you want it to and then you can set it back to 1.0 I would suppose.

Edit: Hey Ryder...I didn't read the name lol...so I know it's a flying vehicle for sure now :) Could've just IM'd me about it :-p
Fenrir Reitveld
Crazy? Don't mind if I do
Join date: 20 Apr 2005
Posts: 459
04-12-2007 11:25
Ryder, you can turn vehicle physics parameters on and off by simple setting the vehicle type. This will clear/set a lot of default vehicle parameters, and I use this effect in one of my objects without a problem. (ie: it flies like a vehicle, until it is deactivated, and then it falls like a normal physical object.) Just do llSetVehicleType (VEHICLE_NONE) when you want it to behave like a normal physical object, and then re-set the vehicle parameters.

A warning: SOME parameters do not reset nicely, for example the mouse-steer flag will stop working if you disable it, no matter how many times you try to re-enable it.
_____________________
----
----
----