Improve beetle and net target visibility

This commit is contained in:
Alexander Sellite 2026-08-24 13:51:21 -04:00
parent 966968e54d
commit a7c71213cc
6 changed files with 15 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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: