diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-09-26 08:11:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-26 08:11:57 +0200 |
commit | 59c3f61d57e745db2eb5ee2eab9c4cac17105f7b (patch) | |
tree | 49b107769d6b24ebf4441ba446a6a41cdfcf68f9 | |
parent | da03791e454e27cda66248d72d85947a8493dcbd (diff) | |
parent | 2ac8c2fa91ad1b7b1612c6621898087600192b9b (diff) |
Merge pull request #11587 from Zylann/directional_light_init
In editor, instance DirectionalLight with an initial orientation
[ci skip]
-rw-r--r-- | scene/3d/light.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp index 7402e664d9..b7cd9bd2dc 100644 --- a/scene/3d/light.cpp +++ b/scene/3d/light.cpp @@ -369,6 +369,12 @@ DirectionalLight::DirectionalLight() set_shadow_depth_range(SHADOW_DEPTH_RANGE_STABLE); blend_splits = false; + +#ifdef TOOLS_ENABLED + if (Engine::get_singleton()->is_editor_hint()) + // Create light with a default natural "sun" orientation in editor, instead of looking horizontally on X + set_rotation_in_degrees(Vector3(-50, 25, 30)); +#endif } void OmniLight::set_shadow_mode(ShadowMode p_mode) { |