I have 2 colliding RigidBody2D's. I want to calculate the impact force from one, to the other. This is for damage simulation. Is there is a value somewhere that defines impact force? I looked, but I didn't see one. This is my progress of calculating impact force myself: - I can get the mass with "get_mass()" - I can get the angular velocity with "get_angular_velocity()". - I can get linear velocity with "get_linear_velocity().length()". All I need in order to calculate impact force is to know the positions of contact. Is there a way to get that information from a RigidBody2D?
How do I get collision impact force with a RigidBody2D?
- Edited
Figured it out. Sorry to bug. Anyone else with this issue, use this: func _integrate_forces(state): var force = state.get_linear_velocity() / state.get_inverse_mass() / state.get_step()
Source: https://godotengine.org/qa/13155/get-collision-force
2 years later
Megalomaniak added the Godot Help tag .