How to disable rigid body physics and collision

Godot Version

godot 4

Question

I want to disable the physics and collision of a rigid body and then add them again later. all the solutions are from godot 3 but i need a solution for godot 4.

pls somebody

You could freeze the rigid body, change the freeze mode depending on your needs. I’ve only had success freezing objects outside of physics functions so you may need to defer it like so

set_deferred("freeze", true)
1 Like

thnx this worked

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.