|
Rubee Adelaide
Registered User
Join date: 2 Oct 2006
Posts: 15
|
10-22-2006 08:03
Hi,
I'm trying to script a boat vehicle. I have read the vehicle scripting guide, and I have been using several other vehicle scripts as examples, but I can't find the answer to my problem.
When I drive my boat, the boat drifts upward on the Z axis for no apparent reason.
I have tried setting the linear and angular friction timescale to zero along the Z axis, and I always have the Z motors set to zero, but the boat keeps floating up.
Can anyone give me a hint why this is happening?
|
|
Zeera Xi
Real Join Date: Mid '05
Join date: 21 Sep 2006
Posts: 54
|
10-22-2006 09:44
Is the main root prim aligned to the axis directions? ( X 0, Y 0, Z 0 ) Or does the script know ( VEHICLE_REFERENCE ) that its not aligned to axis?
|
|
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
|
10-22-2006 10:17
Are you using a set hover height based on the water itself? llWater and VEHICLE_HOVER_HEIGHT are the relevant parameters/commands I believe. if so, how hard does it dampen to that height? It would probably be best to post your vehicle parameter codes so we can see exactly what settings your using. The drifing itself may just be caused by the sim's lag, and you may need to put in a script that checks the current height of the vehicle vs the height of the water, and then apply an impulse to adjust it's altitude accordingly.
[edit] also, what's the value for llSetBouyancy?
_____________________
My SLExchange shopTypos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not. The function is working perfectly fine. It's just not working the way you wanted it to work.
|
|
Rubee Adelaide
Registered User
Join date: 2 Oct 2006
Posts: 15
|
10-22-2006 13:37
Hi, thanks for the replies!
Someone gave me a boat script that I was able to modify and drop into my boat, so now my z-drift is gone. If I ever figure out what was causing the upward drift, I'll post it here for future reference.
One more question though: I thought that if you set your vehicle type to boat, the buoyancy and hover would be set to default values automatically. Is that true? Or do you have to explicitly set all those values? Perhaps that was my problem, because I didn't have all the parameters set....
|
|
Elexia Yan
Registered User
Join date: 21 Aug 2006
Posts: 18
|
10-23-2006 08:27
bounacy is the sneaky devil your after to stop your boat from floating.
|
|
Rubee Adelaide
Registered User
Join date: 2 Oct 2006
Posts: 15
|
10-28-2006 06:16
Yes, I didn't set the buoyancy and hover parameters because I thought those parameters would get default settings when I set my vehicle to type BOAT.
Once I set the 3 hover parameters, the boat stopped floating up (VEHICLE_HOVER_HEIGHT, VEHICLE_HOVER_EFFICIENCY, and VEHICLE_HOVER_TIMESCALE).
Thanks for all the tips, everyone!
|