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

Fixed huge FPS drop when nodes move far away from vehicle #3069

Merged
merged 1 commit into from
Sep 10, 2023

Conversation

ohlidalp
Copy link
Member

@ohlidalp ohlidalp commented Jul 9, 2023

Fixed #3058 - caused by 539a1b2

Solution: instead of considering the whole bounding box when evaluating eventboxes, only consider a bounding box around collision cab nodes. It makes more sense physically and also eliminates surprises, as loose cab nodes would be easily visible.

@ohlidalp ohlidalp marked this pull request as draft July 11, 2023 12:21
@ohlidalp
Copy link
Member Author

Converting to draft because more issues got reported on Discord: https://discord.com/channels/136544456244461568/189904947649708032/1127748999286362132

I tackled the right problem - overstretched bounding box. I just need to go even smarter about it. I already did an experiment once to detect any detached parts: ead8411

@ohlidalp ohlidalp marked this pull request as ready for review September 3, 2023 16:16
@CuriousMike56
Copy link
Collaborator

CuriousMike56 commented Sep 3, 2023

Good news: the main problem is fixed:
RoR_2023-09-03_16-37-27
Bad news: I discovered another scenario. Simply driving far enough away will eventually cause the same issue:
image
Resetting to spawn doesn't stop it. Easier to reproduce on other terrains such as the Community Map.
Oddly enough I haven't been able to reproduce using a plane:
image

Fixed RigsOfRods#3058 - caused by 539a1b2

Changes:
* for eventbox triggering, only consider a bounding box around collision cab nodes. It makes more sense physically and also eliminates surprises, as loose cab nodes would be easily visible.
* ignore cabnodes farther than 15m
@ohlidalp
Copy link
Member Author

ohlidalp commented Sep 3, 2023

Oops, I forgot to reset the new cabnode-boundingbox so it grew indefinitely. Fixed.

The plane probably doesn't have any collision cabs on it so it's completely excluded from the eventbox triggering.

Copy link
Collaborator

@CuriousMike56 CuriousMike56 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good now 👍

@ohlidalp ohlidalp merged commit d4ec0a0 into RigsOfRods:master Sep 10, 2023
2 checks passed
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

Successfully merging this pull request may close these issues.

Nodes far away from actor origin result in huge fps drop
2 participants