Create an integrate_forces
signal, then implement _integrate_forces
in the RigidBody like this:
extends RigidBody
signal integrate_forces( state )
func _integrate_forces( state ):
emit_signal( "integrate_forces", state )
Then the component can just connect the signal to its own desired function:
extends YourComponentType
func _ready():
get_node("path/to/rigidbody").connect( "integrate_forces", self, "_on_rigidbody_integration")
func _on_rigidbody_integration( state ):
# your integration code here
pass
Make sure not to establish the connection with the CONNECT_DEFERRED
flag, or integration will be over by the time the connected function is called.