mirror of
https://github.com/godotengine/godot.git
synced 2025-02-23 23:15:07 +08:00
In editor, instance DirectionalLight with an initial sun-like orientation
This commit is contained in:
parent
5195935156
commit
2ac8c2fa91
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user