+2 votes

Just for this information to be stored somewhere: it is possible to enable physics processing in the editor.

tool

extends Spatial

export (bool) var activate_physics = false setget _activate_physics

func _activate_physics( b ):
    activate_physics = b
    PhysicsServer.set_active( activate_physics )

func _ready():
    pass
asked Mar 14, 2019 in Engine by frankiezafe (86 points)
edited Mar 14, 2019 by frankiezafe

For 2D, it's Physics2DServer.set_active(activate_physics).

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.