diff --git a/gathering/catalog/beetle_stag_common.tres b/gathering/catalog/beetle_stag_common.tres index 65b15df..c8b7d85 100644 --- a/gathering/catalog/beetle_stag_common.tres +++ b/gathering/catalog/beetle_stag_common.tres @@ -19,7 +19,7 @@ scare_radius = 0.1 capture_radius = 0.34 interaction_range = 2.8 charge_duration = 1.0 -sprite_pixel_size = 0.005 +sprite_pixel_size = 0.0075 sprite_tilt_degrees = 0.0 capture_respawn_min_seconds = 90.0 capture_respawn_max_seconds = 150.0 diff --git a/gathering/gathering_controller.gd b/gathering/gathering_controller.gd index 2859145..c061db5 100644 --- a/gathering/gathering_controller.gd +++ b/gathering/gathering_controller.gd @@ -341,10 +341,12 @@ func _build_marker() -> void: _marker_invalid_material.albedo_color = MARKER_INVALID_COLOR _marker_invalid_material.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED _marker_invalid_material.roughness = 1.0 + _marker_invalid_material.no_depth_test = true _marker_valid_material = StandardMaterial3D.new() _marker_valid_material.albedo_color = MARKER_VALID_COLOR _marker_valid_material.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED _marker_valid_material.roughness = 1.0 + _marker_valid_material.no_depth_test = true var disc := CylinderMesh.new() disc.top_radius = marker_radius disc.bottom_radius = marker_radius diff --git a/tests/gathering_marker_surface_validation.gd b/tests/gathering_marker_surface_validation.gd index 8ce3b4a..72f15f0 100644 --- a/tests/gathering_marker_surface_validation.gd +++ b/tests/gathering_marker_surface_validation.gd @@ -44,6 +44,8 @@ func _run() -> void: assert(invalid_material.albedo_color == Color.WHITE) assert(is_equal_approx(invalid_material.albedo_color.a, 1.0)) assert(is_equal_approx(valid_material.albedo_color.a, 1.0)) + assert(invalid_material.no_depth_test) + assert(valid_material.no_depth_test) assert( invalid_material.shading_mode == BaseMaterial3D.SHADING_MODE_UNSHADED diff --git a/tests/generated_world_runtime_validation.gd b/tests/generated_world_runtime_validation.gd index 6e03df7..6c4343f 100644 --- a/tests/generated_world_runtime_validation.gd +++ b/tests/generated_world_runtime_validation.gd @@ -943,6 +943,10 @@ func _validate_prop_catalog(region: GeneratedWorldRegion) -> void: assert(instance.position.is_zero_approx()) assert(_find_mesh_instance(instance) != null) instance.free() + if definition.has_gatherable_surface(): + assert( + definition.gatherable_surface_clearance >= 0.12 + ) var mushroom := catalog.definition_for_id(&"prop_mushroom") assert(mushroom != null and mushroom.has_collision()) assert(mushroom.visual_offset.y < 0.0) diff --git a/tests/tree_gathering_prototype_validation.gd b/tests/tree_gathering_prototype_validation.gd index bb6d1df..2814e19 100644 --- a/tests/tree_gathering_prototype_validation.gd +++ b/tests/tree_gathering_prototype_validation.gd @@ -41,7 +41,7 @@ func _validate_beetle_data() -> void: assert(beetle.target_population_for_anchor_count(8) == 3) assert(beetle.target_population_for_anchor_count(40) == 14) assert(beetle.target_population_for_anchor_count(400) == 64) - assert(is_equal_approx(beetle.sprite_pixel_size, 0.005)) + assert(is_equal_approx(beetle.sprite_pixel_size, 0.0075)) assert(beetle.is_stationary_spawn()) assert(not beetle.can_be_scared()) @@ -128,7 +128,7 @@ func _validate_anchored_presentation() -> void: var sprite := presentation.get_node("GatherableSprite") as Sprite3D assert(sprite != null) assert(is_zero_approx(sprite.position.y)) - assert(is_equal_approx(sprite.pixel_size, 0.005)) + assert(is_equal_approx(sprite.pixel_size, 0.0075)) assert(not sprite.shaded) assert(sprite.billboard == BaseMaterial3D.BILLBOARD_ENABLED) assert(sprite.texture_filter == BaseMaterial3D.TEXTURE_FILTER_NEAREST) diff --git a/world/generation/terrain_prop_definition.gd b/world/generation/terrain_prop_definition.gd index 58fdddd..d2524eb 100644 --- a/world/generation/terrain_prop_definition.gd +++ b/world/generation/terrain_prop_definition.gd @@ -58,7 +58,10 @@ extends Resource ## Reject upward-facing branches and foliage so attachments favor trunk-like ## faces. Zero accepts only vertical faces; one accepts every orientation. @export_range(0.0, 1.0, 0.05) var gatherable_surface_maximum_up_dot := 0.35 -@export_range(0.0, 0.25, 0.005) var gatherable_surface_clearance := 0.025 +## Keep camera-facing creature billboards clear of the sampled trunk as they +## rotate. This is a physical anchor offset, so creatures remain hidden by the +## rest of the tree instead of rendering through it as an overlay. +@export_range(0.0, 0.25, 0.005) var gatherable_surface_clearance := 0.12 func supports_chunk_tags(chunk_tags: PackedStringArray) -> bool: