Click or drag to resize

Engine Properties

The Engine type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberEditorHint

If true, the script is currently running inside the editor. This is useful for tool scripts to conditionally draw editor helpers, or prevent accidentally running "game" code that would affect the scene state while in the editor:

if Engine.editor_hint:
    draw_gizmos()
else:
    simulate_physics()

See Running code in the editor in the documentation for more information.

Note: To detect whether the script is run from an editor build (e.g. when pressing F5), use HasFeature(String) with the "editor" argument instead. OS.has_feature("editor") will evaluate to true both when the code is running in the editor and when running the project from the editor, but it will evaluate to false when the code is run from an exported project.

Public propertyStatic memberIterationsPerSecond

The number of fixed iterations per second. This controls how often physics simulation and _PhysicsProcess(Single) methods are run. This value should generally always be set to 60 or above, as Godot doesn't interpolate the physics step. As a result, values lower than 60 will look stuttery. This value can be increased to make input more reactive or work around tunneling issues, but keep in mind doing so will increase CPU usage.

Public propertyStatic memberPhysicsJitterFix

Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows smoothing out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended.

Public propertyStatic memberSingleton
Public propertyStatic memberTargetFps

The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit.

Public propertyStatic memberTimeScale

Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed.

Top
See Also