Is the "MODE" variable got removed from godot 4 ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Mostafa Saeed
extends RigidBody2D

func _ready()-> void:
	mode = RigidBody2D.MODE_KINIMATIC

func throw_bird():
	mode = RigidBody2D.MODE_RIGID

is says that mode is not declared in the current scope is there any replacement for that variable

:bust_in_silhouette: Reply From: jgodfrey

I haven’t used it, but it looks like you might want PhysicsServer2D.body_set_mode() and theBodyMode enum. See the docs for these items here: