-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Conveyor optimisations #33870
base: master
Are you sure you want to change the base?
Conveyor optimisations #33870
Conversation
- Optimise movement for moving stuff. Better flags + less resolves + slapped parallelrobustjob on it. - Sleeping for entities getting conveyed into walls.
…or-opt # Conflicts: # Resources/Prototypes/Entities/Structures/conveyor.yml
This reverts commit 1b93fda.
}; | ||
|
||
var transform = PhysicsSystem.GetLocalPhysicsTransform(entity.Owner, xform); | ||
transform.Position += direction; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally the actual movement would be done by offsetting the velocity and letting the physics system handle the movement instead of teleporting it in very small steps. Because currently if an entity is being conveyed it has a velocity of zero even though it is moving, which might cause problems for other systems which need that info (for example my homing projectile PR I'm working on).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a body's InAir ideally it doesn't get conveyed at all (which I imagine a homing projectile would be).
The issue is mob movement entirely dictates the mob's velocity so those systems would need rewriting to handle other input sources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is not the projectile (which does not get conveyed), but the velocity of a target object on a conveyor. That relative motion is important for the homing algorithm to be able to intercept.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt I can cook something up anytime soon as most resources I found on it just adjust position directly because it handles corners better + facilitates not tampering with the CC.
It's just a matter of do we think fixing conveyors tanking the server is more worthwhile than waiting for someone to rewrite conveyor movement as they would have to look at something like velocity sources (which box2d doesn't have innately).
Resources/Maps/bagel.yml
Outdated
@@ -72,7 +72,7 @@ entities: | |||
- type: MetaData |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file supposed to be in here?
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
what is the map change for |
Conveyor comp coz something getting conveyed, I can prolly make it not saveable. |
Needs space-wizards/RobustToolbox#5560 + space-wizards/RobustToolbox#5440Needs space-wizards/RobustToolbox#5637I want to give it a shot using shapecasts which will also be a prototype for new mob movement similar to how most games handle it (outside of physics).
Current branch still needs subscribing to airtightchanges or whatever to know if we need to start re-conveying entities.
Resolves #33861