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

stop when street is blocked #87

Open
Fusselwurm opened this issue Jul 27, 2020 · 2 comments
Open

stop when street is blocked #87

Fusselwurm opened this issue Jul 27, 2020 · 2 comments

Comments

@Fusselwurm
Copy link
Member

Fusselwurm commented Jul 27, 2020

driving AI is not to be trusted.
the least we can do is check for people / cars* blocking the street, and fucking wait instead of going around or over obstacles.

*as long they're in working condition

@Fusselwurm
Copy link
Member Author

Fusselwurm commented Jul 29, 2020

might be implemented using customActivity:

start:

  • save remaining waypoints
  • remove waypoints

stop:

  • restore waypoints

... still, unit would first rally again, re-creating any waypoints. soooo... we'd need to look for existing waypoints in all waypoint-creating routines.

ugh also - we'd do this using a new state, and calling customActivity from a state is yuck.

so: new car business state "traffic_jam" with transition from and to bus_voyage | bus_transit


edit2:

// stop:
doStop driver vehicle leader _this;

// resume:
_group group _this;
units _group doFollow leader _group

that's NEAT that is!


problem: vehicle would stop as soon as blockage is detected, which might be quite some way off (depending on speed).

example: vec going at 30m/s with 2s scan interval would need to scan (60m+<brake distance>) ahead, might end up stopping directly behind target or up to 60m away which is a bit too far. I want to bumpers to contact. It's supposed to be a traffic jam ffs, not a convoy excercise.

Thus, putting a waypoint might again become the best solution. Meh.


moveTo also works without removing the group's waypoints. Unofrtunately, afterwards the group currentWaypoint is invalid (index = len waypoints), so currentWaypoint index needs to be restored


btw, BIS_fnc_inAngleSector

@Fusselwurm
Copy link
Member Author

Fusselwurm commented Jul 29, 2020

need to differentiate between oncoming traffic and traffic flow in the same direction

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

No branches or pull requests

1 participant