netfox icon indicating copy to clipboard operation
netfox copied to clipboard

Add NetworkArea nodes as physics extras

Open kumpmati opened this issue 9 months ago • 8 comments

Related to https://github.com/foxssake/netfox/pull/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
  • [x] Test with Jolt
  • [x] Test with Rapier (has issues)
  • [x] Test with Godot Physics
  • [x] Implement Area2/3D methods with rollback support

kumpmati avatar Apr 29 '25 12:04 kumpmati

o

I will test this right now with godot physics stepping

MordikeyeNRigby avatar May 04 '25 01:05 MordikeyeNRigby

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

CardboardCarl avatar May 04 '25 22:05 CardboardCarl

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

kumpmati avatar May 05 '25 17:05 kumpmati

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

elementbound avatar Jun 23 '25 19:06 elementbound

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

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

kumpmati avatar Jun 23 '25 20:06 kumpmati

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 :smile: Let me know if there's anything I can help with, I'm happy to write the docs!

elementbound avatar Jun 27 '25 20:06 elementbound

@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?

kumpmati avatar Oct 07 '25 19:10 kumpmati

@kumpmati whoops, got distracted for a bit :grimacing: I think you are correct, you can also use the NetworkRollback.after_prepare_tick signal

elementbound avatar Nov 19 '25 14:11 elementbound