Jump to content
Sign in to follow this  
animats

How to make vehicles bounce from ban lines

Recommended Posts

Second Life vehicles stop and stick when they hit a ban line. It turns out they can escape by scripting.

banlineballmed.jpg.b4cfea60dab30fc6b668f2231667840a.jpg

Beach ball vs. parcel with object entry prohibited, security orb, red line, and barbed wire fence. Beach ball wins, and rolls around unharmed outside the parcel.

When a physical object hits a ban line, or an object-entry-prohibited area, STATUS_PHYSICS turns off. Scripts continue to run and can detect this. Scripts can then use llSetPos to get the object clear of the troublesome parcel, then turn STATUS_PHYSICS back on and go on moving.

To test this, I put code in the classic Linden beach ball. Works fine on both ban lines and invisible no-object-entry parcels. You get the usual popups about not being allowed to move into a parcel, but they don't stop you from leaving the parcel.

No-script parcels that allow object entry are still a problem.

I put this on Marketplace as "Beach Ball Ban Line Tester"  for a nominal L$10, with full perms, so others can play with this.

I'll be putting this in our motorcycles. I encourage boat builders to try this. This is exactly what's needed in narrow waterways with invisible no-entry areas.

Others must have discovered this. It's very simple. Why isn't it known, documented, and widely used?

  • Like 2

Share this post


Link to post
Share on other sites
4 hours ago, animats said:

Second Life vehicles stop and stick when they hit a ban line. It turns out they can escape by scripting.

banlineballmed.jpg.b4cfea60dab30fc6b668f2231667840a.jpg

Beach ball vs. parcel with object entry prohibited, security orb, red line, and barbed wire fence. Beach ball wins, and rolls around unharmed outside the parcel.

When a physical object hits a ban line, or an object-entry-prohibited area, STATUS_PHYSICS turns off. Scripts continue to run and can detect this. Scripts can then use llSetPos to get the object clear of the troublesome parcel, then turn STATUS_PHYSICS back on and go on moving.

To test this, I put code in the classic Linden beach ball. Works fine on both ban lines and invisible no-object-entry parcels. You get the usual popups about not being allowed to move into a parcel, but they don't stop you from leaving the parcel.

No-script parcels that allow object entry are still a problem.

I put this on Marketplace as "Beach Ball Ban Line Tester"  for a nominal L$10, with full perms, so others can play with this.

I'll be putting this in our motorcycles. I encourage boat builders to try this. This is exactly what's needed in narrow waterways with invisible no-entry areas.

Others must have discovered this. It's very simple. Why isn't it known, documented, and widely used?

The main problem isnt the vehicle getting stuck, its that once you hit a banline you usually get ejected from the vehicle, and the vehicle gets returned, either by SL quirk or land security. If you hit the banline just right so your avatar would be inside the parcel but the root of the vehicle has hit the banline, you get booted out, such as cars hitting a banline straight on, and etc. From the top you can bounce off like as when not seated, i bounced my airplane from the roof of banlines before, its fun. You get stuck as you describe if the root of the vehicle hits the banline but your avatar isnt in the banned parcel.

  • Thanks 1

Share this post


Link to post
Share on other sites
Posted (edited)

banlineescape2.thumb.png.9ae3a31057518c13bce89e1e47edeb2b.png

Ban line recovery in action

I put the code for this into a bike, and drove into some ban lines. First tests were successful.  Hit the ban line, got warning messages. Can't go forward, but can back out. Looks like it's going to work.

This ban line is on the outside of a sharp turn at a blind intersection on a major road in Heterocera. I've hit it twice by accident in the past.

There are more cases to test. Ban lines on region boundaries may be a problem. More later on that.

Our bikes will have this, of course. It should not be hard for power boats that can back up. For sailboats, it's going to be more complicated, but possible. Any solution for aircraft probably won't look realistic.

Edited by animats
Typo.
  • Like 2

Share this post


Link to post
Share on other sites
6 hours ago, IceCold Skytower said:

The main problem isnt the vehicle getting stuck, its that once you hit a banline you usually get ejected from the vehicle, and the vehicle gets returned, either by SL quirk or land security. If you hit the banline just right so your avatar would be inside the parcel but the root of the vehicle has hit the banline, you get booted out, such as cars hitting a banline straight on, and etc. From the top you can bounce off like as when not seated, i bounced my airplane from the roof of banlines before, its fun. You get stuck as you describe if the root of the vehicle hits the banline but your avatar isnt in the banned parcel.

So far, I'm not seeing those problems. I have the code in a bike. I've run into ban lines head-on. I've hit them from a shallow angle. I've hit them at high speed. I've been pushed into them by NPC zombies. Haven't been stuck or unseated yet.

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)
On 6/14/2018 at 4:58 PM, IceCold Skytower said:

The main problem isnt the vehicle getting stuck, its that once you hit a banline you usually get ejected from the vehicle, and the vehicle gets returned, either by SL quirk or land security. If you hit the banline just right so your avatar would be inside the parcel but the root of the vehicle has hit the banline, you get booted out, such as cars hitting a banline straight on, and etc. From the top you can bounce off like as when not seated, i bounced my airplane from the roof of banlines before, its fun. You get stuck as you describe if the root of the vehicle hits the banline but your avatar isnt in the banned parcel.

I've found that situation. It comes from a dysfunctional combination of permission settings. If avatars are not allowed to enter, but object entry is allowed, the vehicle gets in and carries the avatar in. Then the avatar gets detected and ejected. Then the vehicle gets returned. I found some water-bordered parcels in Fritts set that way - avatars blocked by ban lines, object entry allowed to anyone, and, strangely, anyone can build. So you can build on land you can't enter.

There's also a rock in the middle of open water with scripts disabled, for no visible reason. Both of these parcels have friendly messages, so I suspect this is just people checking the wrong checkboxes. This area messed up a Drivers of SL drive recently.

Some permission combos should be prohibited by the system. Turning on a ban line probably ought to also turn object entry off. That would avoid confusion.

Edited by animats

Share this post


Link to post
Share on other sites
On 6/14/2018 at 7:26 PM, animats said:

banlineescape2.thumb.png.9ae3a31057518c13bce89e1e47edeb2b.png

Ban line recovery in action

I put the code for this into a bike, and drove into some ban lines. First tests were successful.  Hit the ban line, got warning messages. Can't go forward, but can back out. Looks like it's going to work.

This ban line is on the outside of a sharp turn at a blind intersection on a major road in Heterocera. I've hit it twice by accident in the past.

There are more cases to test. Ban lines on region boundaries may be a problem. More later on that.

Our bikes will have this, of course. It should not be hard for power boats that can back up. For sailboats, it's going to be more complicated, but possible. Any solution for aircraft probably won't look realistic.

Then again ban lines aren't realistic either.

Share this post


Link to post
Share on other sites
Posted (edited)

Further progress on beating ban lines:

When a vehicle with an avatar on it trying to enter an area where neither avatar nor object is allowed to enter, the results depend on which root prim crosses the parcel boundary first. If the vehicle root enters first, the vehicle is positioned on the boundary and physics is turned off, which freezes the vehicle and any sitting avatars. This is completely recoverable, and our bikes now do that. They back out clear of the restricted parcel and then, stopped, return control to the driver. Ban lines are now mostly a non-problem for our bikes.

If the avatar root enters first, the avatar is ejected from the vehicle. That's no good. So, in BUG-216574, I've proposed that when an avatar linked to a vehicle is about to be ejected, the sim should take the action it takes for prohibited object entry. That is, move the vehicle out of the area and turn off physics. This makes ban line enforcement stricter; you can't get a vehicle partway in if any passenger isn't allowed in. So the property rights absolutists can't complain. It makes ban line collisions recoverable, which is a win for everyone.

Meanwhile, this can be worked around, sort of, by vehicle design.  For motorcycles, it's easy to arrange for the root prim of the vehicle to be ahead of the rider. The rider is on the centerline, and motorcycles don't back up much or go sideways, so this works well in practice. Jagged ban lines can be a problem, if you get trapped in an inside corner.

For boats, this can work too, but not as well, since boats may have avatars well forward or not on the centerline. I have a speedboat equipped this way, and it works well because the driver and passenger sit well back of the center. Not all boats are laid out that way.

For helicopters, this works if you can move the root prim forward of the pilot and passengers. This only works for some helicopter designs, ones where the position of the root prim does not affect the motion much. I've found one that works well, and have been flying across the SL continents without much trouble. I've done Sansara coast to coast; 3 ban line hits, no crashes. Because of the jagged ban line problem, it works better if you fly exactly north, south, east, or west, so you won't hit a jagged ban line at an angle and have the avatar hit first.

For fixed-wing aircraft, this isn't going to work. Being stopped in midair means stalling. The SL aircraft community is working on that. There are some maps of ban lines and obnoxious zero-delay security orbs, but they tend to be out of date. One of SL's good aircraft builders is working on a server based map system to display reported orbs and ban lines on live SL air navigation charts. That will make fast flying work better.

Incidentally, being on a ban list as an individual isn't bad with these fixes. That blocks both an avatar and their objects, so objects trigger the back-out behavior and it's just a minor annoyance.  Parcels which allow object entry but not avatar entry are a problem, but are rare.

Overly fast security orbs remain a problem. A security orb can eject an avatar or object soon as the bounding box crosses a parcel boundary, using llReturnObjectsByID. The auto-backout doesn't trigger until the root prim crosses the boundary. So there's a race between the auto-backout and zero-delay security orbs. This is rare in practice, but there is such a security orb in Corsica, on a parcel empty at ground level and adjoined  by abandoned land.

Each Saturday at noon, Drivers of SL does a rally, and 30-100 people run a course they've never seen before, led by a clever HUD that gives turn by turn directions. Sometimes it's land vehicles; sometimes boats or aircraft. Sometimes all three in one run. There are good prizes for finishing. Much fun. Results there give us a sense of SL's vehicle problems. The usual problems are the dreaded half-unsit (see "Vehicles vs. sim crossings"), ban lines, and semi-crashed sims that no vehicle can enter. Some runs, less than a third of those starting reach the finish. Often due to no fault of the driver. That's pathetic by modern game/virtual world standards.

Since my own vehicles are better than most at the first two problems, I finish first on many of these rides. Not because I'm driving fast; just due to experiencing less SL trouble.

 

Edited by animats
duplicate text
  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×