Enemy adjustments
This commit is contained in:
@@ -9,5 +9,5 @@ collision_layer = 16
|
|||||||
collision_mask = 16
|
collision_mask = 16
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.50124, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.633259, 0)
|
||||||
shape = SubResource("BoxShape3D_7056c")
|
shape = SubResource("BoxShape3D_7056c")
|
||||||
|
|||||||
@@ -105,10 +105,9 @@ radius = 0.2
|
|||||||
height = 1.0
|
height = 1.0
|
||||||
|
|
||||||
[node name="EnemyGuy" type="CharacterBody3D"]
|
[node name="EnemyGuy" type="CharacterBody3D"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0)
|
|
||||||
collision_layer = 10
|
collision_layer = 10
|
||||||
collision_mask = 9
|
collision_mask = 9
|
||||||
motion_mode = 1
|
axis_lock_linear_y = true
|
||||||
script = ExtResource("1_jw471")
|
script = ExtResource("1_jw471")
|
||||||
EnemyStatInfo = ExtResource("2_ewaf6")
|
EnemyStatInfo = ExtResource("2_ewaf6")
|
||||||
|
|
||||||
|
|||||||
@@ -23,10 +23,11 @@ namespace GameJamDungeon
|
|||||||
}
|
}
|
||||||
enemy.NavAgent.TargetPosition = gameRepo.PlayerGlobalPosition.Value;
|
enemy.NavAgent.TargetPosition = gameRepo.PlayerGlobalPosition.Value;
|
||||||
var nextPosition = enemy.NavAgent.GetNextPathPosition();
|
var nextPosition = enemy.NavAgent.GetNextPathPosition();
|
||||||
enemy.LookAt(enemy.NavAgent.GetNextPathPosition());
|
var lookAtPos = enemy.NavAgent.GetNextPathPosition();
|
||||||
|
enemy.LookAt(new Vector3(lookAtPos.X, enemy.GlobalPosition.Y, lookAtPos.Z), Vector3.Up);
|
||||||
|
|
||||||
var direction = enemy.NavAgent.GetNextPathPosition() - enemy.GlobalPosition;
|
var direction = enemy.NavAgent.GetNextPathPosition() - enemy.GlobalPosition;
|
||||||
enemy.Velocity = direction * 2.0f * (float)delta;
|
enemy.Velocity = enemy.Velocity.MoveToward(direction.Normalized() * 0.01f, (float)delta);
|
||||||
|
|
||||||
Output(new Output.MovementComputed(enemy.Velocity));
|
Output(new Output.MovementComputed(enemy.Velocity));
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ gizmo_extents = 1.0
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
||||||
[node name="EnemySpawn1" type="Marker3D" parent="EnemySpawnPoints"]
|
[node name="EnemySpawn1" type="Marker3D" parent="EnemySpawnPoints"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.053, -3.59858, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.053, -3, 0)
|
||||||
|
|
||||||
[node name="ItemDatabase" parent="." instance=ExtResource("4_2mnb7")]
|
[node name="ItemDatabase" parent="." instance=ExtResource("4_2mnb7")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ gizmo_extents = 1.0
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
||||||
[node name="EnemySpawn1" type="Marker3D" parent="EnemySpawnPoints"]
|
[node name="EnemySpawn1" type="Marker3D" parent="EnemySpawnPoints"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.833, -3.72961, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.833, -3, 0)
|
||||||
|
|
||||||
[node name="Minimap Texture" type="MeshInstance3D" parent="."]
|
[node name="Minimap Texture" type="MeshInstance3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -4.50433, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -4.50433, 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user