Keep rain above generated tree canopies
This commit is contained in:
parent
45c903bd24
commit
8456093f8c
2 changed files with 36 additions and 8 deletions
|
|
@ -524,6 +524,15 @@ func _validate_weather_presentation() -> void:
|
|||
assert(rain.emitting)
|
||||
assert(rain.amount_ratio > 0.99)
|
||||
assert(rain.amount == WorldTimeVisualControllerType.RAIN_PARTICLE_AMOUNT)
|
||||
assert(
|
||||
WorldTimeVisualControllerType.RAIN_EMITTER_OFFSET.y
|
||||
>= WorldTimeVisualControllerType.RAIN_SUPPORTED_CANOPY_HEIGHT
|
||||
+ WorldTimeVisualControllerType.RAIN_CANOPY_CLEARANCE
|
||||
)
|
||||
assert(is_equal_approx(
|
||||
rain.lifetime,
|
||||
WorldTimeVisualControllerType.RAIN_LIFETIME_SECONDS,
|
||||
))
|
||||
assert(rain.visibility_aabb == (
|
||||
WorldTimeVisualControllerType.RAIN_VISIBILITY_AABB
|
||||
))
|
||||
|
|
@ -548,6 +557,9 @@ func _validate_weather_presentation() -> void:
|
|||
rain_material.initial_velocity_max,
|
||||
WorldTimeVisualControllerType.RAIN_VELOCITY_MAX,
|
||||
))
|
||||
assert(rain_material.gravity.is_equal_approx(
|
||||
WorldTimeVisualControllerType.RAIN_GRAVITY
|
||||
))
|
||||
var rain_mesh := rain.draw_pass_1 as BoxMesh
|
||||
assert(rain_mesh != null)
|
||||
assert(rain_mesh.size.is_equal_approx(
|
||||
|
|
@ -569,6 +581,11 @@ func _validate_weather_presentation() -> void:
|
|||
assert(rain_collision.size.is_equal_approx(
|
||||
WorldTimeVisualControllerType.RAIN_COLLISION_SIZE
|
||||
))
|
||||
assert(
|
||||
rain_collision.size.y * 0.5
|
||||
> WorldTimeVisualControllerType.RAIN_EMITTER_OFFSET.y
|
||||
+ WorldTimeVisualControllerType.RAIN_EMISSION_EXTENTS.y
|
||||
)
|
||||
assert(
|
||||
rain_collision.heightfield_mask
|
||||
== PrecipitationOcclusionType.RENDER_LAYER_MASK
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue