Skip to content

Conversation

kumpmati
Copy link
Contributor

@kumpmati kumpmati commented Apr 29, 2025

Related to #437

Physics rollback messes with Area2/3D entered and exited signals, making them fire multiple times, especially with ping + CharacterBodies.

The NetworkArea2/3D helper nodes introduce rollback-aware versions of Area2/3D signals and methods with a rollback_ prefix.

TODO:

  • Documentation
  • Test with Jolt
  • Test with Rapier (has issues)
  • Test with Godot Physics
  • Implement Area2/3D methods with rollback support

@MordikeyeNRigby
Copy link

o

I will test this right now with godot physics stepping

@CardboardCarl
Copy link

I'll test this out with rapier when I get a second

@kumpmati
Copy link
Contributor Author

kumpmati commented May 5, 2025

I will test this right now with godot physics stepping

I'll test this out with rapier when I get a second

Thank you both! 🚀
If you haven't tested the code yet, here's an example repo I made to help test out issues with the different engines.

https://github.com/kumpmati/netfox-physics-rollback-test

NetworkTime.on_tick.connect(_tick)


func _tick(_d: float, tick: int):
Copy link
Contributor

Choose a reason for hiding this comment

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

This runs in the tick loop, yet the signals emitted are labeled as rollback. Could you please clarify?

@elementbound
Copy link
Contributor

@kumpmati is the example repo still up? I can't open it.

@kumpmati
Copy link
Contributor Author

@kumpmati is the example repo still up? I can't open it.

Sorry I had made it private, it's now public again

Copy link
Contributor Author

@kumpmati kumpmati left a comment

Choose a reason for hiding this comment

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

Some things I should do still

@elementbound
Copy link
Contributor

Some things I should do still

No worries @kumpmati, take your time! I think this will be another great addition to netfox's featureset, so I don't mind waiting a bit 😄 Let me know if there's anything I can help with, I'm happy to write the docs!

@kumpmati
Copy link
Contributor Author

kumpmati commented Oct 7, 2025

@elementbound Finally got around to updating this 🙂 From my understanding I should check for overlapping bodies/areas during _after_prepare_tick, since by then rollbacked nodes have their states set correctly?

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.

4 participants