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

Look Ahead by Path #55

Open
kianzarrin opened this issue Dec 1, 2022 · 3 comments
Open

Look Ahead by Path #55

kianzarrin opened this issue Dec 1, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@kianzarrin
Copy link
Collaborator

kianzarrin commented Dec 1, 2022

image
ExperimentMod.zip
As I discussed I have written a test mod that can use PathUnit to calculate certain distance ahead by seconds/meters.
Now I want to bring this mod to FPS camera to calculate look ahead. this is much more reliable than target pos which was not meant for this.

@kianzarrin kianzarrin added the enhancement New feature or request label Dec 1, 2022
@kianzarrin kianzarrin self-assigned this Dec 1, 2022
@kianzarrin
Copy link
Collaborator Author

I also wrote this mod that merely renders path info for debugging (does not render a certain distance ahead):
https://steamcommunity.com/sharedfiles/filedetails/?id=2883351966

@kianzarrin
Copy link
Collaborator Author

kianzarrin commented Dec 1, 2022

@Asu4ni I have a working code (Was very easy to copy paste :) . The only question now is what to do in settings. which one of the these constants should be adjustable in settings:

  • seconds ahead
  • car minimum distance ahead (in case car is slow or has stopped)
  • human distance ahead (human speed is constant so seconds don't matter).
  • angle factor pos.angle = Angle.Lerp(pos.angle, dir.AsLookingAngle(), angleFactor) (currently constant 90%)

@Asu4ni
Copy link
Owner

Asu4ni commented Dec 4, 2022

@kianzarrin I've refactored the code after PR. If everything looks good, I'd hopefully publish the changes alongside some bug fixes next week.

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

No branches or pull requests

2 participants