Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Help: Land Vehicle, Rough Terrain

Nevyn Pascal
Gadget Maker
Join date: 10 Jun 2005
Posts: 8
07-17-2005 11:13
I have been playing around with making a land vehicle and I'm having some issues when it comes to rough terrain. When my vehicle hits a transition to a sloped area it stops. Looks like the leading edge of the bounding box hitting the slope is too steep of an angle for it to figure out how to get past. I am not looking to make a hover vehicle.

Is there just something obvious I'm missing to make it able to deal with rough terrain?

At the moment I'm trying to look at the slope ahead and apply a little up to both the angular and linear motors when I detect a slope. It sorta works, I can get over some terrain irregularities that I cannot without doing this, but it acts a little odd (oddities could be due to my confusion).

Any suggestions on how to deal with this? Vehicle parameters I'm not understanding that can help adjust for this?

Thanks,
Nevyn
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
07-17-2005 21:11
Unfortunately, vehicle pathing code is fairly primitive. It sounds to me like your vehicle either doesn't have enough "juice" or it's pushing in the wrong direction.

While not an expert with the built-in vehicle functions (I hate 'em), I'll say that if all else fails you can have a look at functions like llApplyImpulse or give the vehicle a *very* slight hover. :)

Alternately, if the vehicle has any sort of code at play to keep it upright, you may also want to tweak those variables.
_____________________
---
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
07-17-2005 23:52
You might want to take a look at llGroundNormal and llGroundSlope. These should help you determine in which direction to "point" the vehicle motor so that the vehicle can travel over the ground rather then into it :)

As an alternative, you can set a very low (near zero) ground-level based VEHICLE_HOVER_HEIGHT.
==Chris
_____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
07-18-2005 17:51
I had this problem when making a Landspeeder... I didn't use hover because it wouldn't work over bridges. So, I did what George Lucas did, I made invisible wheels. My Landspeeder uses two very large (monster-truck sized) cylinders, one in front and one in rear, like the Flintstones car. They're positioned in a way that prevents me from becoming stuck in most situations, and textured with the invisi-texture.
Nevyn Pascal
Gadget Maker
Join date: 10 Jun 2005
Posts: 8
07-19-2005 11:04
Thank you for the replies.
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
07-19-2005 11:22
Hmm... I'm not sure, but what might happen if you multiplied your linear velocity by the ground slope? If you multiply a vector by a rotation, you rotate the vector.
Aerolithe Mechanique
Registered User
Join date: 14 Jun 2005
Posts: 21
11-08-2005 05:26
Nevyn, did you end up solving this to your satisfaction?

I've been working on the same problem recently, maybe we could put our noggins together and get something working.

My current calculations are based on the difference between the slope 5m ahead (positive x) and the the slope directly underneath my root prim.

I've tinkered with using llSetRot on a timer, and applying angular engines to make the corrections without much luck.
Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
11-08-2005 07:02
There is open source code that does something like this in Ben Linden's hoverboard. You can get it for 50bux at Oak Grove.
Aerolithe Mechanique
Registered User
Join date: 14 Jun 2005
Posts: 21
11-08-2005 07:18
But that would rely on hover wouldn't it?, which doesn't work over bridges and roads.

I'll check it out in any case, thanks Hun. ;)
Jon Marlin
Builder, Coder, RL & SL
Join date: 10 Mar 2005
Posts: 297
11-09-2005 08:37
If your script has the following two lines (with whatever values), comment out the lines:

llSetVehicleFloatParam (VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 300);
llSetVehicleFloatParam (VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 0);

- Jon
_____________________
Come visit Marlin Engineering at Horseshoe (222, 26) to see my line of flying vehicles.
Aerolithe Mechanique
Registered User
Join date: 14 Jun 2005
Posts: 21
11-09-2005 10:46
I'll try that when i get online tonight Jon, The vertical attractor has been set in pretty much every example i've seen. I wouldn't have thought to remove it.

Thanks
Aerolithe Mechanique
Registered User
Join date: 14 Jun 2005
Posts: 21
11-11-2005 14:07
From my testing it appears that commenting up the vertical attractor lines helped a little, although i had already set it quite low.

After seeing how well the Dominus climbs terrain, I know it can be done. I just don't know how it was accomplished yet.

I'll keep at it, and post any successes here.

Thanks everyone.