ata/cgit.css'/>
Now About Social Code
index
NameDescriptionOwnerIdle
sgx-reversingTools for reverse engineering the sgx540 GPU on a ci20 dev boardLucas Fryzek
spacegameUntitled space game made in Godot 4Lucas Fryzek
weegtkWeechat relay using Libadwaita and Gtk4Lucas Fryzek
value='grep'>log msg
path: root/models/portal.blend.import
diff options
context:
space:
mode:
Diffstat (limited to 'models/portal.blend.import')
0 files changed, 0 insertions, 0 deletions
>a84a09796d0ae5a699d5d23b05d2d37a4f37295e /src/window.py parentbe71bf80d290c98c0f6a66d3dcab28515b4ea371 (diff)
chat: Get auto-scroll working, and fix ssh conn
Diffstat (limited to 'src/window.py')
0 files changed, 0 insertions, 0 deletions
html> /cuad3khwmhnsa"]
[ext_resource type="Script" path="res://scripts/enemy.gd" id="1_aut2k"]
@@ -8,6 +8,9 @@
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_s5qw4"]
+[sub_resource type="BoxShape3D" id="BoxShape3D_cyd43"]
+size = Vector3(20, 2, 20)
+
[node name="Enemy" type="CharacterBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.54414, -1.58742)
motion_mode = 1
@@ -28,4 +31,15 @@ wait_time = 0.2
[node name="NavigationAgent3D" type="NavigationAgent3D" parent="."]
+[node name="VisionVolume" type="Area3D" parent="."]
+collision_layer = 4
+collision_mask = 4
+input_ray_pickable = false
+
+[node name="VisionVolumeShape" type="CollisionShape3D" parent="VisionVolume"]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
+shape = SubResource("BoxShape3D_cyd43")
+
[connection signal="timeout" from="HitTimer" to="." method="_on_hit_timer_timeout"]
+[connection signal="body_entered" from="VisionVolume" to="." method="_on_body_entered"]
+[connection signal="body_exited" from="VisionVolume" to="." method="_on_body_exited"]
2, y), [Vector3(-1, 0, 0), Vector3(0, -2, 0)], Vector3.FORWARD)
+ pass
func _ready() -> void:
var starting_axis = randi_range(0, 1)
@@ -164,3 +165,5 @@ func _ready() -> void:
var tri_mesh = mesh.mesh.create_trimesh_shape()
$NavigationRegion3D/StaticBody3D/CollisionShape3D.shape = tri_mesh
$NavigationRegion3D.bake_navigation_mesh()
+
+ #ResourceSaver.save(mesh.mesh, "res://map.tres", ResourceSaver.FLAG_COMPRESS)
diff --git a/scripts/enemy.gd b/scripts/enemy.gd
index 1c4c063..716493c 100644
--- a/scripts/enemy.gd
+++ b/scripts/enemy.gd
@@ -67,10 +67,13 @@ func chase_nav_mesh(delta: float):
# We only want to navigate on XZ plane
new_velocity.y = 0
- velocity = new_velocity
+ velocity = velocity.move_toward(new_velocity, .25)
if not is_on_floor() and gravity_enabled:
velocity.y -= gravity * delta
+ else:
+ velocity.y = 0
+
move_and_slide()
func _physics_process(delta: float) -> void: