Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Flying vehicle script problem

Grizzly Dawson
Registered User
Join date: 24 Sep 2003
Posts: 47
11-03-2004 04:32
Ok, I'm just about to give up on this. I can't figure this out and I'm starting to think there is a bug involved in SL.


I'm making a flying vehicle that should hover above the ground. The driver should be able to control it to make it go up or down. When it does go up or down it should go STRAIGHT UP or DOWN. It should not aim up or down like an airplane does, but rather go straight up or down like a UFO (which it is).

I've tried setting the linear motor z to a value + for up and - for down. However the darn thing insists on aiming up or down as well and therefor when you try to go up or down it loop de loops in a giant circle and slams you into the ground. Even if I set the angular motor friction to 1 and set the linear motor x and y to 1 and z 1000. It still does this. It doesn't make any sense!!! It should then go straigt up or down, but it still insists on looping.

I've also tried ignoring the z linear motor and instead adjusting the hover hieght, however this seems to be always in parallel refrence to the ground. So it only works correctly over flat land. If there is a hill or any sloping land once again the UFO tilts to be parallel to the ground.


This is very frustrating. Has anyone attempted to make a vehicle like this before (UFO?)? You would think this would be a very simple vehicle that moves straight up, down, left, right, forward, back. No banking or anything, just moves in 90 deg directions. Should be simple, but its obviously not. Any clues or ideas would be appreciated.
Al Bravo
Retired
Join date: 29 Jun 2004
Posts: 373
11-03-2004 04:49
I have made 2 hover vehicles that perform like this. From what you said, it sounds like you might need to apply the VERTICAL_ATTRACTION params. This will keep the vehicle right side up. Also, I used the actual HOVER params to get the straight up/down motion. So, adjust VEHICLE_HOVER_HEIGHT on up/down controls. This is a bit limiting since it maxes at 96m above ground if I remember right. But, for a hover vehicle that kind of makes sense.
Apotheus Silverman
I write code.
Join date: 17 Nov 2003
Posts: 416
11-03-2004 09:23
Grizzly, the problem you are experiencing is related to VEHICLE_ANGULAR_DEFLECTION_TIMESCALE and VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY.

*Most* vehicles don't need angular deflection. At all. Especially if you don't know what it is.

To remove the behavior they are causing, set the timescale to 1000 and efficiency to 0.001 or some such numbers.

Also with regards to your hover height problem, there is a vehicle flag VEHICLE_HOVER_GLOBAL_HEIGHT that when set, makes the hover height match the world's z axis.
_____________________
Apotheus Silverman
Shop SL on the web - SLExchange.com

Visit Abbotts Aerodrome for gobs of flying fun.
Maximus Zander
Registered User
Join date: 30 Apr 2004
Posts: 55
11-08-2004 07:19
llSetStatus(STATUS_ROTATE_Y, FALSE);
Grizzly Dawson
Registered User
Join date: 24 Sep 2003
Posts: 47
11-10-2004 04:09
Yup the angluar deflection worked like a charm! Thanks


BTW vehicles are availble free for everyone at Phantisie Isle or Nautilus vendors