Activating a RigidBody in editor

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By andersmmg

I want to start simulation of a RigidBody while still in the editor, mostly for level design. Rather than placing it manually and having it maybe jump when the level is loaded, it would be great to be able to place it and have it fall into place using physics simulation.
Is this possible? I don’t see any options in the editor for enabling simulation, and I’m not sure what it is that makes it only work in the actual game.

:bust_in_silhouette: Reply From: dmitriy_shmilo

You need tool for that. Attach a script to your scene, add tool keyword, in _ready(): callback activate physics server with Physics2DServer.set_active(true), and reload your scene.

Awesome, this is just what I needed! Thanks

andersmmg | 2021-02-11 20:25