Time-independent force functions don't work, but dependent do

Godot Version

4.4.1

Question

force_issue

Hello!

I was trying to write a dismemberment functionality for my enemy, and the .gif attached is more or less what im aiming for.

The issue is, the code is using time depended force functions on a rigidbidy3d. The dismemberment function is only called one time, so i believe i should be using time_independent alternatives instead? However, when I try using them, the results are wrong - body goes underground as if collider wasn’t there, or body is not affected by the impulse at all.

I tried using call_deferred() as well as await process_frame and await process_physics_frame, but that did not help.

My code is this:

 func dismember():
var rbs = find_children(“MeshRB”, “RigidBody3D”)
for rb : RigidBody3D in rbs:
var mesh =rb.get_parent()
rb.reparent(get_tree().current_scene)
mesh.reparent(rb)
rb.freeze = false
rb.sleeping = false
#i do not understand why time_dependend func work here instead of independent ones
rb.apply_central_force(rb.global_position.direction_to(self.global_position) * 500 * -1)
rb.apply_torque(-rb.transform.basis.x * 100)

rb.start_decompose()

Yes, you should be using apply_central_impulse(). If there is no effect to the body, maybe you need to just increase the force and play around with the values until it works well.

Thank you. I was trying increasing the force, but there was no effect. I think it might have something to do with me doing a lot of reparenting in the code.