Compare commits
No commits in common. "430abcb294294fc4e384b7a6478e6193c69a3a61" and "271436ae429ef29c48791aedfe1f93895d852dc6" have entirely different histories.
430abcb294
...
271436ae42
Before Width: | Height: | Size: 751 B |
|
@ -1,35 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://3javrn230ddq"
|
|
||||||
path.s3tc="res://.godot/imported/enemy.png-5d9e9a0aed69241a8fe1b1e792f29a11.s3tc.ctex"
|
|
||||||
metadata={
|
|
||||||
"imported_formats": ["s3tc_bptc"],
|
|
||||||
"vram_texture": true
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/images/enemy.png"
|
|
||||||
dest_files=["res://.godot/imported/enemy.png-5d9e9a0aed69241a8fe1b1e792f29a11.s3tc.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=2
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_compression=1
|
|
||||||
compress/normal_map=0
|
|
||||||
compress/channel_pack=0
|
|
||||||
mipmaps/generate=true
|
|
||||||
mipmaps/limit=-1
|
|
||||||
roughness/mode=0
|
|
||||||
roughness/src_normal=""
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
process/hdr_as_srgb=false
|
|
||||||
process/hdr_clamp_exposure=false
|
|
||||||
process/size_limit=0
|
|
||||||
detect_3d/compress_to=0
|
|
Before Width: | Height: | Size: 457 B |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://dlri7s2frrdhn"
|
|
||||||
path="res://.godot/imported/bulldoze.png-f442a46f4c41643018dbc217208307b3.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/images/icons/bulldoze.png"
|
|
||||||
dest_files=["res://.godot/imported/bulldoze.png-f442a46f4c41643018dbc217208307b3.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_compression=1
|
|
||||||
compress/normal_map=0
|
|
||||||
compress/channel_pack=0
|
|
||||||
mipmaps/generate=false
|
|
||||||
mipmaps/limit=-1
|
|
||||||
roughness/mode=0
|
|
||||||
roughness/src_normal=""
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
process/hdr_as_srgb=false
|
|
||||||
process/hdr_clamp_exposure=false
|
|
||||||
process/size_limit=0
|
|
||||||
detect_3d/compress_to=1
|
|
Before Width: | Height: | Size: 519 B |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://b48vbil24uyma"
|
|
||||||
path="res://.godot/imported/conveyor.png-96f8a1f1c91a6942a7cf18b5de34d6de.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/images/icons/conveyor.png"
|
|
||||||
dest_files=["res://.godot/imported/conveyor.png-96f8a1f1c91a6942a7cf18b5de34d6de.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_compression=1
|
|
||||||
compress/normal_map=0
|
|
||||||
compress/channel_pack=0
|
|
||||||
mipmaps/generate=false
|
|
||||||
mipmaps/limit=-1
|
|
||||||
roughness/mode=0
|
|
||||||
roughness/src_normal=""
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
process/hdr_as_srgb=false
|
|
||||||
process/hdr_clamp_exposure=false
|
|
||||||
process/size_limit=0
|
|
||||||
detect_3d/compress_to=1
|
|
Before Width: | Height: | Size: 494 B |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://cfu3m8pss1ph8"
|
|
||||||
path="res://.godot/imported/conveyor2.png-27f2f1a9f1f04af6d87188affcf3df94.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/images/icons/conveyor2.png"
|
|
||||||
dest_files=["res://.godot/imported/conveyor2.png-27f2f1a9f1f04af6d87188affcf3df94.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_compression=1
|
|
||||||
compress/normal_map=0
|
|
||||||
compress/channel_pack=0
|
|
||||||
mipmaps/generate=false
|
|
||||||
mipmaps/limit=-1
|
|
||||||
roughness/mode=0
|
|
||||||
roughness/src_normal=""
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
process/hdr_as_srgb=false
|
|
||||||
process/hdr_clamp_exposure=false
|
|
||||||
process/size_limit=0
|
|
||||||
detect_3d/compress_to=1
|
|
Before Width: | Height: | Size: 763 B |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://c41pea1l3e5b8"
|
|
||||||
path="res://.godot/imported/miner.png-9ee09dca341263eed8bd4404783b89a0.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/images/icons/miner.png"
|
|
||||||
dest_files=["res://.godot/imported/miner.png-9ee09dca341263eed8bd4404783b89a0.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_compression=1
|
|
||||||
compress/normal_map=0
|
|
||||||
compress/channel_pack=0
|
|
||||||
mipmaps/generate=false
|
|
||||||
mipmaps/limit=-1
|
|
||||||
roughness/mode=0
|
|
||||||
roughness/src_normal=""
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
process/hdr_as_srgb=false
|
|
||||||
process/hdr_clamp_exposure=false
|
|
||||||
process/size_limit=0
|
|
||||||
detect_3d/compress_to=1
|
|
Before Width: | Height: | Size: 472 B |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://dh2iqb21845yr"
|
|
||||||
path="res://.godot/imported/processor.png-3952eabd91890086e922e0b19faeb2f8.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/images/icons/processor.png"
|
|
||||||
dest_files=["res://.godot/imported/processor.png-3952eabd91890086e922e0b19faeb2f8.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_compression=1
|
|
||||||
compress/normal_map=0
|
|
||||||
compress/channel_pack=0
|
|
||||||
mipmaps/generate=false
|
|
||||||
mipmaps/limit=-1
|
|
||||||
roughness/mode=0
|
|
||||||
roughness/src_normal=""
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
process/hdr_as_srgb=false
|
|
||||||
process/hdr_clamp_exposure=false
|
|
||||||
process/size_limit=0
|
|
||||||
detect_3d/compress_to=1
|
|
Before Width: | Height: | Size: 415 B |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://cgbwagn11sku6"
|
|
||||||
path="res://.godot/imported/storage.png-3adc23a1edee77451ef4bc1d5a0c01f1.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/images/icons/storage.png"
|
|
||||||
dest_files=["res://.godot/imported/storage.png-3adc23a1edee77451ef4bc1d5a0c01f1.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_compression=1
|
|
||||||
compress/normal_map=0
|
|
||||||
compress/channel_pack=0
|
|
||||||
mipmaps/generate=false
|
|
||||||
mipmaps/limit=-1
|
|
||||||
roughness/mode=0
|
|
||||||
roughness/src_normal=""
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
process/hdr_as_srgb=false
|
|
||||||
process/hdr_clamp_exposure=false
|
|
||||||
process/size_limit=0
|
|
||||||
detect_3d/compress_to=1
|
|
Before Width: | Height: | Size: 545 B |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://c1mmxh7v77d8j"
|
|
||||||
path="res://.godot/imported/turret.png-4ec2f289235e0b0cd98f6371dc285038.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/images/icons/turret.png"
|
|
||||||
dest_files=["res://.godot/imported/turret.png-4ec2f289235e0b0cd98f6371dc285038.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_compression=1
|
|
||||||
compress/normal_map=0
|
|
||||||
compress/channel_pack=0
|
|
||||||
mipmaps/generate=false
|
|
||||||
mipmaps/limit=-1
|
|
||||||
roughness/mode=0
|
|
||||||
roughness/src_normal=""
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
process/hdr_as_srgb=false
|
|
||||||
process/hdr_clamp_exposure=false
|
|
||||||
process/size_limit=0
|
|
||||||
detect_3d/compress_to=1
|
|
Before Width: | Height: | Size: 607 B |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://kp4ghn1277as"
|
|
||||||
path="res://.godot/imported/watchtower.png-ac7844aed43d5bef373da01c0142cfda.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/images/icons/watchtower.png"
|
|
||||||
dest_files=["res://.godot/imported/watchtower.png-ac7844aed43d5bef373da01c0142cfda.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_compression=1
|
|
||||||
compress/normal_map=0
|
|
||||||
compress/channel_pack=0
|
|
||||||
mipmaps/generate=false
|
|
||||||
mipmaps/limit=-1
|
|
||||||
roughness/mode=0
|
|
||||||
roughness/src_normal=""
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
process/hdr_as_srgb=false
|
|
||||||
process/hdr_clamp_exposure=false
|
|
||||||
process/size_limit=0
|
|
||||||
detect_3d/compress_to=1
|
|
Before Width: | Height: | Size: 443 B |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://brjswv5ryy8om"
|
|
||||||
path="res://.godot/imported/lilguy.png-051ea7725e05924272fe99d4c4cd30d6.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/images/lilguy.png"
|
|
||||||
dest_files=["res://.godot/imported/lilguy.png-051ea7725e05924272fe99d4c4cd30d6.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_compression=1
|
|
||||||
compress/normal_map=0
|
|
||||||
compress/channel_pack=0
|
|
||||||
mipmaps/generate=false
|
|
||||||
mipmaps/limit=-1
|
|
||||||
roughness/mode=0
|
|
||||||
roughness/src_normal=""
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
process/hdr_as_srgb=false
|
|
||||||
process/hdr_clamp_exposure=false
|
|
||||||
process/size_limit=0
|
|
||||||
detect_3d/compress_to=1
|
|
Before Width: | Height: | Size: 293 B |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://cpov32m0nxjvh"
|
|
||||||
path="res://.godot/imported/lilguy_arms.png-579679cf4842d72a1b6c8bc34db4fa7f.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/images/lilguy_arms.png"
|
|
||||||
dest_files=["res://.godot/imported/lilguy_arms.png-579679cf4842d72a1b6c8bc34db4fa7f.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_compression=1
|
|
||||||
compress/normal_map=0
|
|
||||||
compress/channel_pack=0
|
|
||||||
mipmaps/generate=false
|
|
||||||
mipmaps/limit=-1
|
|
||||||
roughness/mode=0
|
|
||||||
roughness/src_normal=""
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
process/hdr_as_srgb=false
|
|
||||||
process/hdr_clamp_exposure=false
|
|
||||||
process/size_limit=0
|
|
||||||
detect_3d/compress_to=1
|
|
Before Width: | Height: | Size: 652 B |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://utyt0hpkjivi"
|
|
||||||
path="res://.godot/imported/storage.png-0ed6d9cb26a6f113e92ee0f27610fb5e.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/images/storage.png"
|
|
||||||
dest_files=["res://.godot/imported/storage.png-0ed6d9cb26a6f113e92ee0f27610fb5e.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_compression=1
|
|
||||||
compress/normal_map=0
|
|
||||||
compress/channel_pack=0
|
|
||||||
mipmaps/generate=false
|
|
||||||
mipmaps/limit=-1
|
|
||||||
roughness/mode=0
|
|
||||||
roughness/src_normal=""
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
process/hdr_as_srgb=false
|
|
||||||
process/hdr_clamp_exposure=false
|
|
||||||
process/size_limit=0
|
|
||||||
detect_3d/compress_to=1
|
|
Before Width: | Height: | Size: 630 B |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://xpm6i82tui2o"
|
|
||||||
path="res://.godot/imported/watchtower.png-bfe6e962b45eb638333684d4f53c22ab.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/images/watchtower.png"
|
|
||||||
dest_files=["res://.godot/imported/watchtower.png-bfe6e962b45eb638333684d4f53c22ab.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_compression=1
|
|
||||||
compress/normal_map=0
|
|
||||||
compress/channel_pack=0
|
|
||||||
mipmaps/generate=false
|
|
||||||
mipmaps/limit=-1
|
|
||||||
roughness/mode=0
|
|
||||||
roughness/src_normal=""
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
process/hdr_as_srgb=false
|
|
||||||
process/hdr_clamp_exposure=false
|
|
||||||
process/size_limit=0
|
|
||||||
detect_3d/compress_to=1
|
|
|
@ -1 +1,30 @@
|
||||||
extends GridMap
|
extends GridMap
|
||||||
|
|
||||||
|
var timer: float = 0
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
timer += delta
|
||||||
|
if timer > 1:
|
||||||
|
timer = 0
|
||||||
|
test_path()
|
||||||
|
|
||||||
|
if NavigationServer3D.get_maps().is_empty():
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
func test_path() -> void:
|
||||||
|
if NavigationServer3D.get_maps().is_empty():
|
||||||
|
return
|
||||||
|
|
||||||
|
var map_rid: RID = NavigationServer3D.get_maps()[0]
|
||||||
|
|
||||||
|
for region_rid in NavigationServer3D.map_get_regions(map_rid):
|
||||||
|
NavigationServer3D.region_set_travel_cost(region_rid, randf_range(0, 10))
|
||||||
|
|
||||||
|
var a: Vector3 = Vector3(1, 1, 1)
|
||||||
|
var b: Vector3 = Vector3(20,1,20)
|
||||||
|
var path: PackedVector3Array = NavigationServer3D.map_get_path(map_rid, a, b, true, 1)
|
||||||
|
|
||||||
|
DebugDraw3D.draw_sphere(a, 0.5, Color.GREEN, 1)
|
||||||
|
DebugDraw3D.draw_sphere(b, 0.5, Color.RED, 1)
|
||||||
|
DebugDraw3D.draw_line_path(path, Color.YELLOW, 1)
|
||||||
|
|
121
node_3d.tscn
|
@ -1,48 +0,0 @@
|
||||||
[gd_scene load_steps=7 format=3 uid="uid://1gcj3gixy6hs"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://f0j7u0so2ug5" path="res://scripts/unit.gd" id="1_dberb"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://3javrn230ddq" path="res://assets/images/enemy.png" id="2_2pk7s"]
|
|
||||||
|
|
||||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_a0tk4"]
|
|
||||||
friction = 0.25
|
|
||||||
bounce = 0.2
|
|
||||||
|
|
||||||
[sub_resource type="SphereShape3D" id="SphereShape3D_a202f"]
|
|
||||||
|
|
||||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_jka67"]
|
|
||||||
transparency = 2
|
|
||||||
alpha_scissor_threshold = 0.5
|
|
||||||
alpha_antialiasing_mode = 0
|
|
||||||
albedo_texture = ExtResource("2_2pk7s")
|
|
||||||
texture_filter = 0
|
|
||||||
billboard_mode = 1
|
|
||||||
|
|
||||||
[sub_resource type="QuadMesh" id="QuadMesh_i5arm"]
|
|
||||||
material = SubResource("StandardMaterial3D_jka67")
|
|
||||||
|
|
||||||
[node name="Enemy" type="RigidBody3D"]
|
|
||||||
axis_lock_angular_x = true
|
|
||||||
axis_lock_angular_y = true
|
|
||||||
axis_lock_angular_z = true
|
|
||||||
physics_material_override = SubResource("PhysicsMaterial_a0tk4")
|
|
||||||
script = ExtResource("1_dberb")
|
|
||||||
movement_force = 5.0
|
|
||||||
max_speed = 5.0
|
|
||||||
|
|
||||||
[node name="NavigationAgent3D" type="NavigationAgent3D" parent="."]
|
|
||||||
path_desired_distance = 0.5
|
|
||||||
target_desired_distance = 0.5
|
|
||||||
path_max_distance = 1.01
|
|
||||||
avoidance_enabled = true
|
|
||||||
max_speed = 5.0
|
|
||||||
debug_enabled = true
|
|
||||||
debug_path_custom_color = Color(1, 0, 0.0808306, 1)
|
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
|
||||||
shape = SubResource("SphereShape3D_a202f")
|
|
||||||
|
|
||||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
|
||||||
mesh = SubResource("QuadMesh_i5arm")
|
|
||||||
|
|
||||||
[node name="ShapeCast3D" type="ShapeCast3D" parent="."]
|
|
||||||
shape = SubResource("SphereShape3D_a202f")
|
|
|
@ -8,19 +8,6 @@
|
||||||
|
|
||||||
config_version=5
|
config_version=5
|
||||||
|
|
||||||
[addons]
|
|
||||||
|
|
||||||
resources_spreadsheet_view/array_color_tint=100.0
|
|
||||||
resources_spreadsheet_view/color_rows=true
|
|
||||||
resources_spreadsheet_view/array_min_width=128.0
|
|
||||||
resources_spreadsheet_view/resource_preview_size=32.0
|
|
||||||
resources_spreadsheet_view/clip_headers=false
|
|
||||||
resources_spreadsheet_view/dupe_arrays=true
|
|
||||||
resources_spreadsheet_view/context_menu_on_leftclick=false
|
|
||||||
resources_spreadsheet_view/fold_docks=true
|
|
||||||
resources_spreadsheet_view/resource_cell_label_mode=1
|
|
||||||
resources_spreadsheet_view/freeze_first_column=true
|
|
||||||
|
|
||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="TowerGame3D"
|
config/name="TowerGame3D"
|
||||||
|
@ -28,13 +15,6 @@ run/main_scene="uid://bwftban1ppo17"
|
||||||
config/features=PackedStringArray("4.4")
|
config/features=PackedStringArray("4.4")
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
[debug]
|
|
||||||
|
|
||||||
shapes/navigation/enable_edge_connections_xray=false
|
|
||||||
shapes/navigation/enable_edge_lines_xray=false
|
|
||||||
shapes/navigation/enable_link_connections_xray=false
|
|
||||||
shapes/navigation/enable_agent_paths_xray=false
|
|
||||||
|
|
||||||
[editor]
|
[editor]
|
||||||
|
|
||||||
version_control/plugin_name="GitPlugin"
|
version_control/plugin_name="GitPlugin"
|
||||||
|
@ -42,16 +22,11 @@ version_control/autoload_on_startup=true
|
||||||
|
|
||||||
[editor_plugins]
|
[editor_plugins]
|
||||||
|
|
||||||
enabled=PackedStringArray("res://addons/PathMesh3D/plugin.cfg", "res://addons/git_describe/plugin.cfg", "res://addons/resources_spreadsheet_view/plugin.cfg")
|
enabled=PackedStringArray("res://addons/PathMesh3D/plugin.cfg", "res://addons/git_describe/plugin.cfg")
|
||||||
|
|
||||||
[navigation]
|
[navigation]
|
||||||
|
|
||||||
3d/default_edge_connection_margin=0.6
|
3d/default_edge_connection_margin=1.5
|
||||||
3d/default_link_connection_radius=0.5
|
|
||||||
|
|
||||||
[physics]
|
|
||||||
|
|
||||||
common/physics_interpolation=true
|
|
||||||
|
|
||||||
[rendering]
|
[rendering]
|
||||||
|
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
extends RigidBody3D
|
|
||||||
class_name Unit
|
|
||||||
|
|
||||||
@export var movement_force: float = 100
|
|
||||||
@export var max_speed: float = 100
|
|
||||||
|
|
||||||
var target_velocity: Vector3 = Vector3()
|
|
||||||
|
|
||||||
func _ready() -> void:
|
|
||||||
$NavigationAgent3D.connect("velocity_computed", avoidance_velocity_computed)
|
|
||||||
|
|
||||||
func avoidance_velocity_computed(velocity: Vector3) -> void:
|
|
||||||
if velocity != target_velocity:
|
|
||||||
DebugDraw3D.draw_line(global_position, global_position + velocity, Color.ORANGE)
|
|
||||||
#print("Avoidance issued!")
|
|
||||||
target_velocity = velocity
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
|
||||||
if $NavigationAgent3D.is_target_reached() or $NavigationAgent3D.target_position.is_zero_approx():
|
|
||||||
$NavigationAgent3D.target_position = NavigationServer3D.map_get_random_point(NavigationServer3D.get_maps()[0], 1, true)
|
|
||||||
else:
|
|
||||||
#DebugDraw3D.draw_sphere($NavigationAgent3D.target_position, 0.5, Color.RED)
|
|
||||||
var next_point: Vector3 = $NavigationAgent3D.get_next_path_position()
|
|
||||||
DebugDraw3D.draw_sphere(next_point, 0.1, Color.YELLOW)
|
|
||||||
var direction: Vector3 = (next_point - global_position).normalized()
|
|
||||||
#DebugDraw3D.draw_line(global_position, global_position + linear_velocity, Color.BLUE)
|
|
||||||
var target_velocity: Vector3 = direction * max_speed
|
|
||||||
$NavigationAgent3D.velocity = target_velocity
|
|
||||||
DebugDraw3D.draw_line(global_position, global_position + target_velocity, Color.MAGENTA)
|
|
||||||
|
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
|
||||||
if $ShapeCast3D.is_colliding():
|
|
||||||
var force_direction: Vector3 = (target_velocity-linear_velocity)
|
|
||||||
var normal: Vector3 = $ShapeCast3D.get_collision_normal(0)
|
|
||||||
DebugDraw3D.draw_line(global_position, global_position + normal, Color.DODGER_BLUE)
|
|
||||||
var force: Vector3 = (force_direction * movement_force).slide(normal)
|
|
||||||
DebugDraw3D.draw_line(global_position, global_position + force, Color.GREEN)
|
|
||||||
apply_central_force(force)
|
|
|
@ -1 +0,0 @@
|
||||||
uid://f0j7u0so2ug5
|
|
34
tiles.tscn
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=9 format=3 uid="uid://bexxobgiojrfa"]
|
[gd_scene load_steps=5 format=3 uid="uid://bexxobgiojrfa"]
|
||||||
|
|
||||||
[sub_resource type="BoxMesh" id="BoxMesh_qra7f"]
|
[sub_resource type="BoxMesh" id="BoxMesh_qra7f"]
|
||||||
size = Vector3(2, 1, 2)
|
size = Vector3(2, 1, 2)
|
||||||
|
@ -19,22 +19,6 @@ size = Vector2(2, 2)
|
||||||
center_offset = Vector3(0, 0.5, 0)
|
center_offset = Vector3(0, 0.5, 0)
|
||||||
orientation = 1
|
orientation = 1
|
||||||
|
|
||||||
[sub_resource type="PrismMesh" id="PrismMesh_qra7f"]
|
|
||||||
left_to_right = 0.0
|
|
||||||
size = Vector3(2, 1, 2)
|
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_qra7f"]
|
|
||||||
points = PackedVector3Array(-1, -0.5, -1, -1, 0.5, -1, 1, -0.5, -1, -1, -0.5, 1, -1, 0.5, 1, 1, -0.5, 1)
|
|
||||||
|
|
||||||
[sub_resource type="NavigationMesh" id="NavigationMesh_7h0kd"]
|
|
||||||
vertices = PackedVector3Array(-0.735052, 0.760437, -0.75, -0.735052, 0.760437, 0.75, 0.764948, 0.010437, 0.75, 0.764948, 0.010437, -0.75)
|
|
||||||
polygons = [PackedInt32Array(3, 2, 0), PackedInt32Array(0, 2, 1)]
|
|
||||||
agent_radius = 0.2
|
|
||||||
|
|
||||||
[sub_resource type="QuadMesh" id="QuadMesh_k6t24"]
|
|
||||||
size = Vector2(2.2, 2)
|
|
||||||
orientation = 1
|
|
||||||
|
|
||||||
[node name="Tiles" type="Node3D"]
|
[node name="Tiles" type="Node3D"]
|
||||||
|
|
||||||
[node name="Cube" type="MeshInstance3D" parent="."]
|
[node name="Cube" type="MeshInstance3D" parent="."]
|
||||||
|
@ -50,19 +34,3 @@ navigation_mesh = SubResource("NavigationMesh_qra7f")
|
||||||
|
|
||||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Cube/NavigationRegion3D"]
|
[node name="MeshInstance3D" type="MeshInstance3D" parent="Cube/NavigationRegion3D"]
|
||||||
mesh = SubResource("QuadMesh_7h0kd")
|
mesh = SubResource("QuadMesh_7h0kd")
|
||||||
|
|
||||||
[node name="Ramp" type="MeshInstance3D" parent="."]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.99928, -0.00256312, 0.000191689)
|
|
||||||
mesh = SubResource("PrismMesh_qra7f")
|
|
||||||
|
|
||||||
[node name="StaticBody3D" type="StaticBody3D" parent="Ramp"]
|
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Ramp/StaticBody3D"]
|
|
||||||
shape = SubResource("ConvexPolygonShape3D_qra7f")
|
|
||||||
|
|
||||||
[node name="NavigationRegion3D" type="NavigationRegion3D" parent="Ramp"]
|
|
||||||
navigation_mesh = SubResource("NavigationMesh_7h0kd")
|
|
||||||
|
|
||||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Ramp/NavigationRegion3D"]
|
|
||||||
transform = Transform3D(0.895502, 0.445057, 0, -0.445057, 0.895502, 0, 0, 0, 1, 0, 0, 0)
|
|
||||||
mesh = SubResource("QuadMesh_k6t24")
|
|
||||||
|
|