Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripted agent falls off vehicle on sim borders #23

Open
lemmy04 opened this issue May 20, 2020 · 4 comments
Open

scripted agent falls off vehicle on sim borders #23

lemmy04 opened this issue May 20, 2020 · 4 comments

Comments

@lemmy04
Copy link

lemmy04 commented May 20, 2020

whenever I log in using radegast or any other client/viewer based on libremetaverse or any of its precessors, I can't use vehicles to cross sim borders.

To reproduce/demonstrate:

  • log in with radegast
  • sit on someone's vehicle
  • have that someone drive across a sim border
  • notice that the avatar that is logged in with radegast gets unseated at the sim border

any viewer/client that uses libremetaverse or any of its precessors has this problem: it reproduces with at least radegast 2.32, corrade, and the "TestClient.exe" that comes with libopenmetaverse.

@cxtal
Copy link
Contributor

cxtal commented May 24, 2020

Some filler: it seems that region crossing (without teleports) in general are broken such that the issue seems to not be restricted to vehicles. Whenever a bot is at the region border and is pushed forward (let's say, with a nudge), the bot either refuses to traverse the region boundary, jumps around or just gets stuck and becomes unresponsive. As per the documentation, it seems that MULTIPLE_SIMULATOR_CONNECTIONS has to be enabled for region crossings to work however the setting does not seem to have any effect.

In the case of vehicles, intuitively what happens is that when the bot is seated and the vehicle traverses the region boundary, the bot just does not traverse which leads to the effect mentioned by @lemmy04 where the bot gets "unseated". Unsitting during region crossings is allegedly a long standing bug that appeared in all major viewers and was an issue created by both server-side and client-side design; and still is, only that the issue now has some quality bandaids to reduce the problem.

In this case it seems that the unsitting is a symptom and rather related to crossing boundaries in general (just walking, not necessarily seated on a vehicle, as a passenger or otherwise) rather than some deep client or server-side bug (such as velocity interpolations) or design problem.

@cxtal
Copy link
Contributor

cxtal commented May 24, 2020

And a little bugfix (?) but probably just tangential since it does not seem to be relevant to this issue: in ObjectManager.cs, two handlers are defined Network_OnDisconnected and Network_OnConnected that are supposed to stop or start a timer InterpolationTimer whenever the bot disconnects, respectively connects to the grid. The Network_OnConnected handler branches on Client.Settings.USE_INTERPOLATION_TIMER and is supposed to conditionally start the timer.

However, it seems that the handlers are not bound to any event such that the interpolation timer does not start and all the code in the InterpolationTimer body does not run at all making the Client.Settings.USE_INTERPOLATION_TIMER setting useless.

To fix this:

            Client.Network.Disconnected += Network_OnDisconnected;
            Client.Network.LoginProgress += Network_OnConnected;

can be added to the constructor and the handlers can be altered to have the following signatures:

private void Network_OnDisconnected(object sender, DisconnectedEventArgs e)
private void Network_OnConnected(object sender, LoginProgressEventArgs e)

This will make the interpolation timer work and update the primitives - perhaps some fancy Task.Parallel could be added to the body of the interpolation timer since there does not seem to be any common environment between the parallel bodies of the loop that updates the primitives.

@conzog
Copy link

conzog commented Jul 19, 2020

Has anyone checked into this since May? This happens all the time on all kinds of vehicles. Is there a contact for looking into MULTIPLE_SIMULATOR_CONNECTIONS?
Lemmy04, have you tested this on the SL viewer too?

@cxtal
Copy link
Contributor

cxtal commented Sep 4, 2020

By my estimates, this issue would require writing an implementation: it is not a bug but rather a lack of code to do what is intended. Standard viewers have this issue as well, on and off, but it is "improved" and does not show up so often. MULTIPLE_SIMS is defined in the very latest documentation as necessary for sim crossings:

Should we connect to multiple sims? This will allow viewing in to neighboring simulators and sim crossings (Experimental)

but it is marked as experimental and aside from actually "viewing in to neighboring simulators" there is not much of an improvement concerning sim crossings even if this flag is enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants