Skip to content

Commit

Permalink
Improve navigation/agent-related settings, #74
Browse files Browse the repository at this point in the history
  • Loading branch information
Scony committed Jan 25, 2024
1 parent ddfee71 commit e376d0b
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 11 deletions.
7 changes: 5 additions & 2 deletions source/match/Match.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,12 @@ geometry_parsed_geometry_type = 2
geometry_collision_mask = 4278190082
geometry_source_geometry_mode = 2
geometry_source_group_name = &"terrain_navigation_input"
agent_height = 2.0
agent_radius = 1.0
cell_size = 0.3
cell_height = 0.3
agent_height = 1.8
agent_radius = 0.9
agent_max_climb = 0.0
edge_max_error = 1.0

[sub_resource type="ViewportTexture" id="ViewportTexture_vu2gm"]
viewport_path = NodePath("FogOfWar/CombinedViewport")
Expand Down
6 changes: 3 additions & 3 deletions source/match/MatchConstants.gd
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class Terrain:
const PLANE = Plane(Vector3.UP, 0)

class Navmesh:
const CELL_SIZE = 0.25
const CELL_HEIGHT = 0.25
const MAX_AGENT_RADIUS = 1.0 # max radius of movable units
const CELL_SIZE = 0.3
const CELL_HEIGHT = 0.3
const MAX_AGENT_RADIUS = 0.9 # max radius of movable units


class Resources:
Expand Down
2 changes: 1 addition & 1 deletion source/match/units/AircraftFactory.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ radius = 1.5

[sub_resource type="CylinderShape3D" id="CylinderShape3D_ea0ur"]
height = 1.0
radius = 1.5
radius = 1.1

[sub_resource type="BoxShape3D" id="BoxShape3D_67hxr"]
size = Vector3(0.1, 5, 0.1)
Expand Down
2 changes: 1 addition & 1 deletion source/match/units/AntiAirTurret.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ radius = 0.6

[sub_resource type="CylinderShape3D" id="CylinderShape3D_65kle"]
height = 0.8
radius = 0.6
radius = 0.2

[node name="AntiAirTurret" type="Area3D"]
collision_layer = 2
Expand Down
2 changes: 1 addition & 1 deletion source/match/units/AntiGroundTurret.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ radius = 0.6

[sub_resource type="CylinderShape3D" id="CylinderShape3D_t2frt"]
height = 0.8
radius = 0.6
radius = 0.2

[node name="AntiGroundTurret" type="Area3D"]
collision_layer = 2
Expand Down
2 changes: 1 addition & 1 deletion source/match/units/CommandCenter.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ radius = 1.8

[sub_resource type="CylinderShape3D" id="CylinderShape3D_2xy8f"]
height = 0.8
radius = 1.8
radius = 1.4

[sub_resource type="BoxShape3D" id="BoxShape3D_mt1cx"]
size = Vector3(0.1, 5, 0.1)
Expand Down
5 changes: 4 additions & 1 deletion source/match/units/Tank.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,18 @@ shape = SubResource("CylinderShape3D_sjc11")

[node name="Highlight" parent="." instance=ExtResource("1_n4t54")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, 0)
radius = 0.9

[node name="Selection" parent="." instance=ExtResource("2_mbcqe")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, 0)
radius = 0.9

[node name="Movement" parent="." instance=ExtResource("3_4m8ma")]
path_desired_distance = 0.5
target_desired_distance = 0.5
path_height_offset = 0.5
path_max_distance = 0.51
radius = 1.0
radius = 0.9
neighbor_distance = 8.0
max_neighbors = 40
time_horizon_agents = 3.0
Expand All @@ -57,3 +59,4 @@ size = Vector2(160, 10)

[node name="Targetability" parent="." instance=ExtResource("8_ca2nt")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, 0)
radius = 0.9
2 changes: 1 addition & 1 deletion source/match/units/VehicleFactory.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ radius = 1.5

[sub_resource type="CylinderShape3D" id="CylinderShape3D_x8l2r"]
height = 1.0
radius = 1.5
radius = 1.1

[sub_resource type="BoxShape3D" id="BoxShape3D_jajvw"]
size = Vector3(0.1, 5, 0.1)
Expand Down
1 change: 1 addition & 0 deletions source/match/units/non-player/ResourceA.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ height = 0.6

[sub_resource type="CylinderShape3D" id="CylinderShape3D_wb6so"]
height = 0.6
radius = 0.1

[node name="ResourceA" type="Area3D" groups=["resource_units"]]
script = ExtResource("1_3daqx")
Expand Down
1 change: 1 addition & 0 deletions source/match/units/non-player/ResourceB.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ height = 0.8

[sub_resource type="CylinderShape3D" id="CylinderShape3D_002vj"]
height = 0.8
radius = 0.1

[node name="ResourceB" type="Area3D" groups=["resource_units"]]
script = ExtResource("1_57n8v")
Expand Down

0 comments on commit e376d0b

Please sign in to comment.