Merge pull request #11587 from Zylann/directional_light_init
In editor, instance DirectionalLight with an initial orientation [ci skip]
This commit is contained in:
commit
59c3f61d57
1 changed files with 6 additions and 0 deletions
|
@ -369,6 +369,12 @@ DirectionalLight::DirectionalLight()
|
||||||
set_shadow_depth_range(SHADOW_DEPTH_RANGE_STABLE);
|
set_shadow_depth_range(SHADOW_DEPTH_RANGE_STABLE);
|
||||||
|
|
||||||
blend_splits = false;
|
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) {
|
void OmniLight::set_shadow_mode(ShadowMode p_mode) {
|
||||||
|
|
Loading…
Reference in a new issue