goodbye collisions
This commit is contained in:
@@ -1,70 +1,85 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://5ce7ky4o0q2e"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://5ce7ky4o0q2e"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dha44dnvwhajo" path="res://Textures/Projectiles/Projectile_Capricorn.png" id="1_bvyt4"]
|
||||
[ext_resource type="Script" path="res://Player/Base/Projectile.cs" id="1_ovnwu"]
|
||||
[ext_resource type="AudioStream" uid="uid://bykwwct1not4e" path="res://Audio/SFX/capricorn laeser.wav" id="2_lofnw"]
|
||||
[ext_resource type="AudioStream" uid="uid://cat08h84wm5gm" path="res://Audio/SFX/ominous.wav" id="3_h1ve3"]
|
||||
|
||||
[sub_resource type="Curve3D" id="Curve3D_bnc6v"]
|
||||
[sub_resource type="Curve3D" id="Curve3D_bch55"]
|
||||
_data = {
|
||||
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0.008, 1, -5),
|
||||
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, -0.00347188, 1, 0.533723, 0, 0, 0, 0, 0, 0, 0.008, 1, -5),
|
||||
"tilts": PackedFloat32Array(0, 0)
|
||||
}
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_bnunv"]
|
||||
height = 7.40727
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_hebl4"]
|
||||
height = 44.0041
|
||||
radius = 0.419241
|
||||
|
||||
[node name="CapricornLaser" type="Node3D"]
|
||||
[sub_resource type="Curve3D" id="Curve3D_ciqkc"]
|
||||
_data = {
|
||||
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, -0.00347188, 1, 0.533723, 0, 0, 0, 0, 0, 0, 0.008, 1, -5),
|
||||
"tilts": PackedFloat32Array(0, 0)
|
||||
}
|
||||
point_count = 2
|
||||
|
||||
[node name="CapricornAlt" type="Node3D"]
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0, 0)
|
||||
|
||||
[node name="Left Shot" type="Path3D" parent="."]
|
||||
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0.105376, 0.772365, 1.51984)
|
||||
top_level = true
|
||||
curve = SubResource("Curve3D_bch55")
|
||||
script = ExtResource("1_ovnwu")
|
||||
Cooldown = 1.0
|
||||
_projectileSpeed = 3.0
|
||||
_projectileSpeed = 5.0
|
||||
_soundEffect = ExtResource("2_lofnw")
|
||||
_onHitSfx = ExtResource("3_h1ve3")
|
||||
|
||||
[node name="Forward Shot" type="Path3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.25)
|
||||
top_level = true
|
||||
curve = SubResource("Curve3D_bnc6v")
|
||||
|
||||
[node name="PathFollow3D" type="PathFollow3D" parent="Forward Shot"]
|
||||
transform = Transform3D(-0.999998, 0, 0.00159994, 0, 1, 0, -0.00159994, 0, -0.999998, 0, 1, 0)
|
||||
[node name="PathFollow3D" type="PathFollow3D" parent="Left Shot"]
|
||||
transform = Transform3D(0.999997, 0, -0.00207308, 0, 1, 0, 0.00207308, 0, 0.999997, -0.00347188, 1, 0.533723)
|
||||
loop = false
|
||||
tilt_enabled = false
|
||||
|
||||
[node name="Hitbox" type="RigidBody3D" parent="Forward Shot/PathFollow3D"]
|
||||
transform = Transform3D(-1, 0, -0.000800046, 0, 1, 0, 0.000800046, 0, -1, 0.000400023, -1, 0.5)
|
||||
collision_layer = 34
|
||||
collision_mask = 34
|
||||
[node name="Hitbox" type="RigidBody3D" parent="Left Shot/PathFollow3D"]
|
||||
transform = Transform3D(1, 0, -1.86265e-09, 0, 1, 0, 1.86265e-09, 0, 1, -0.00244793, 0.0059973, 0.293898)
|
||||
collision_layer = 0
|
||||
collision_mask = 0
|
||||
gravity_scale = 0.0
|
||||
continuous_cd = true
|
||||
max_contacts_reported = 1
|
||||
contact_monitor = true
|
||||
can_sleep = false
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Forward Shot/PathFollow3D/Hitbox"]
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Left Shot/PathFollow3D/Hitbox"]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
|
||||
shape = SubResource("CylinderShape3D_bnunv")
|
||||
shape = SubResource("CylinderShape3D_hebl4")
|
||||
|
||||
[node name="Sprite3D2" type="Sprite3D" parent="Forward Shot/PathFollow3D/Hitbox"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.33, 0, 0.5)
|
||||
[node name="Sprite3D2" type="Sprite3D" parent="Left Shot/PathFollow3D/Hitbox/CollisionShape3D"]
|
||||
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -0.663415, 0, 0.752893)
|
||||
centered = false
|
||||
axis = 1
|
||||
texture = ExtResource("1_bvyt4")
|
||||
|
||||
[node name="Backward Shot" type="Path3D" parent="."]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0.25)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.098024, 0.772365, -2.01984)
|
||||
top_level = true
|
||||
curve = SubResource("Curve3D_bnc6v")
|
||||
curve = SubResource("Curve3D_ciqkc")
|
||||
script = ExtResource("1_ovnwu")
|
||||
Cooldown = 1.0
|
||||
_projectileSpeed = 5.0
|
||||
_soundEffect = ExtResource("2_lofnw")
|
||||
_onHitSfx = ExtResource("3_h1ve3")
|
||||
|
||||
[node name="PathFollow3D" type="PathFollow3D" parent="Backward Shot"]
|
||||
transform = Transform3D(-0.999998, 0, 0.00159994, 0, 1, 0, -0.00159994, 0, -0.999998, 0, 1, 0)
|
||||
transform = Transform3D(0.999997, 0, -0.00207308, 0, 1, 0, 0.00207308, 0, 0.999997, -0.00347188, 1, 0.533723)
|
||||
loop = false
|
||||
tilt_enabled = false
|
||||
|
||||
[node name="Hitbox" type="RigidBody3D" parent="Backward Shot/PathFollow3D"]
|
||||
transform = Transform3D(-1, 0, -0.000800046, 0, 1, 0, 0.000800046, 0, -1, 0.000400023, -1, 0.5)
|
||||
collision_layer = 34
|
||||
collision_mask = 34
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.000400023, 0.00831366, 0.5)
|
||||
collision_layer = 0
|
||||
collision_mask = 0
|
||||
gravity_scale = 0.0
|
||||
continuous_cd = true
|
||||
max_contacts_reported = 1
|
||||
@@ -73,10 +88,13 @@ can_sleep = false
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Backward Shot/PathFollow3D/Hitbox"]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
|
||||
shape = SubResource("CylinderShape3D_bnunv")
|
||||
shape = SubResource("CylinderShape3D_hebl4")
|
||||
|
||||
[node name="Sprite3D2" type="Sprite3D" parent="Backward Shot/PathFollow3D/Hitbox"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.33, 0, 0.5)
|
||||
centered = false
|
||||
axis = 1
|
||||
texture = ExtResource("1_bvyt4")
|
||||
|
||||
[connection signal="body_entered" from="Left Shot/PathFollow3D/Hitbox" to="Left Shot" method="OnProjectileHit" flags=18]
|
||||
[connection signal="body_entered" from="Backward Shot/PathFollow3D/Hitbox" to="Left Shot" method="OnProjectileHit" flags=18]
|
||||
|
||||
@@ -1,71 +1,87 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://cdsc35cj566q1"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://cdsc35cj566q1"]
|
||||
|
||||
[ext_resource type="Script" path="res://Player/Base/Projectile.cs" id="1_tbx8y"]
|
||||
[ext_resource type="Texture2D" uid="uid://dha44dnvwhajo" path="res://Textures/Projectiles/Projectile_Capricorn.png" id="2_8osg4"]
|
||||
[ext_resource type="AudioStream" uid="uid://bykwwct1not4e" path="res://Audio/SFX/capricorn laeser.wav" id="2_jeoco"]
|
||||
[ext_resource type="AudioStream" uid="uid://cat08h84wm5gm" path="res://Audio/SFX/ominous.wav" id="3_r2jj5"]
|
||||
|
||||
[sub_resource type="Curve3D" id="Curve3D_goxuk"]
|
||||
[sub_resource type="Curve3D" id="Curve3D_usgyk"]
|
||||
_data = {
|
||||
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0.008, 1, -5),
|
||||
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, -0.00347188, 1, 0.533723, 0, 0, 0, 0, 0, 0, 0.008, 1, -5),
|
||||
"tilts": PackedFloat32Array(0, 0)
|
||||
}
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_hebl4"]
|
||||
height = 7.40727
|
||||
height = 44.0041
|
||||
radius = 0.419241
|
||||
|
||||
[sub_resource type="Curve3D" id="Curve3D_p2eme"]
|
||||
_data = {
|
||||
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, -0.00347188, 1, 0.533723, 0, 0, 0, 0, 0, 0, 0.008, 1, -5),
|
||||
"tilts": PackedFloat32Array(0, 0)
|
||||
}
|
||||
point_count = 2
|
||||
|
||||
[node name="CapricornLaser" type="Node3D"]
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0, 0)
|
||||
|
||||
[node name="Left Shot" type="Path3D" parent="." node_paths=PackedStringArray("_hitBox")]
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -1.66814, 0.772365, -0.25)
|
||||
top_level = true
|
||||
curve = SubResource("Curve3D_usgyk")
|
||||
script = ExtResource("1_tbx8y")
|
||||
Cooldown = 1.0
|
||||
_projectileSpeed = 3.0
|
||||
_projectileSpeed = 5.0
|
||||
_soundEffect = ExtResource("2_jeoco")
|
||||
_onHitSfx = ExtResource("3_r2jj5")
|
||||
_hitBox = NodePath("PathFollow3D/Hitbox")
|
||||
|
||||
[node name="Forward Shot" type="Path3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.25)
|
||||
top_level = true
|
||||
curve = SubResource("Curve3D_goxuk")
|
||||
|
||||
[node name="PathFollow3D" type="PathFollow3D" parent="Forward Shot"]
|
||||
transform = Transform3D(-0.999998, 0, 0.00159994, 0, 1, 0, -0.00159994, 0, -0.999998, 0, 1, 0)
|
||||
[node name="PathFollow3D" type="PathFollow3D" parent="Left Shot"]
|
||||
transform = Transform3D(0.999997, 0, -0.00207308, 0, 1, 0, 0.00207308, 0, 0.999997, -0.00347188, 1, 0.533723)
|
||||
loop = false
|
||||
tilt_enabled = false
|
||||
|
||||
[node name="Hitbox" type="RigidBody3D" parent="Forward Shot/PathFollow3D"]
|
||||
transform = Transform3D(-1, 0, -0.000800046, 0, 1, 0, 0.000800046, 0, -1, 0.000400023, -1, 0.5)
|
||||
collision_layer = 34
|
||||
collision_mask = 34
|
||||
[node name="Hitbox" type="RigidBody3D" parent="Left Shot/PathFollow3D"]
|
||||
transform = Transform3D(1, 0, -1.86265e-09, 0, 1, 0, 1.86265e-09, 0, 1, -0.00244793, 0.0059973, 0.293898)
|
||||
collision_layer = 0
|
||||
collision_mask = 0
|
||||
gravity_scale = 0.0
|
||||
continuous_cd = true
|
||||
max_contacts_reported = 1
|
||||
contact_monitor = true
|
||||
can_sleep = false
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Forward Shot/PathFollow3D/Hitbox"]
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Left Shot/PathFollow3D/Hitbox"]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
|
||||
shape = SubResource("CylinderShape3D_hebl4")
|
||||
|
||||
[node name="Sprite3D2" type="Sprite3D" parent="Forward Shot/PathFollow3D/Hitbox"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.33, 0, 0.5)
|
||||
[node name="Sprite3D2" type="Sprite3D" parent="Left Shot/PathFollow3D/Hitbox/CollisionShape3D"]
|
||||
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -0.663415, 0, 0.752893)
|
||||
centered = false
|
||||
axis = 1
|
||||
texture = ExtResource("2_8osg4")
|
||||
|
||||
[node name="Backward Shot" type="Path3D" parent="."]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0.25)
|
||||
[node name="Backward Shot" type="Path3D" parent="." node_paths=PackedStringArray("_hitBox")]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 1.87154, 0.772365, -0.25)
|
||||
top_level = true
|
||||
curve = SubResource("Curve3D_goxuk")
|
||||
curve = SubResource("Curve3D_p2eme")
|
||||
script = ExtResource("1_tbx8y")
|
||||
Cooldown = 1.0
|
||||
_projectileSpeed = 5.0
|
||||
_soundEffect = ExtResource("2_jeoco")
|
||||
_onHitSfx = ExtResource("3_r2jj5")
|
||||
_hitBox = NodePath("../Left Shot/PathFollow3D/Hitbox")
|
||||
|
||||
[node name="PathFollow3D" type="PathFollow3D" parent="Backward Shot"]
|
||||
transform = Transform3D(-0.999998, 0, 0.00159994, 0, 1, 0, -0.00159994, 0, -0.999998, 0, 1, 0)
|
||||
transform = Transform3D(0.999997, 0, -0.00207308, 0, 1, 0, 0.00207308, 0, 0.999997, -0.00347188, 1, 0.533723)
|
||||
loop = false
|
||||
tilt_enabled = false
|
||||
|
||||
[node name="Hitbox" type="RigidBody3D" parent="Backward Shot/PathFollow3D"]
|
||||
transform = Transform3D(-1, 0, -0.000800046, 0, 1, 0, 0.000800046, 0, -1, 0.000400023, -1, 0.5)
|
||||
collision_layer = 34
|
||||
collision_mask = 34
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.000400023, 0.00831366, 0.5)
|
||||
collision_layer = 0
|
||||
collision_mask = 0
|
||||
gravity_scale = 0.0
|
||||
continuous_cd = true
|
||||
max_contacts_reported = 1
|
||||
@@ -81,3 +97,6 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.33, 0, 0.5)
|
||||
centered = false
|
||||
axis = 1
|
||||
texture = ExtResource("2_8osg4")
|
||||
|
||||
[connection signal="body_entered" from="Left Shot/PathFollow3D/Hitbox" to="Left Shot" method="OnProjectileHit"]
|
||||
[connection signal="body_entered" from="Backward Shot/PathFollow3D/Hitbox" to="Left Shot" method="OnProjectileHit"]
|
||||
|
||||
@@ -216,11 +216,12 @@ size = Vector3(0.856928, 1.65704, 0.82877)
|
||||
|
||||
[node name="Capricorn" type="CharacterBody3D" groups=["Player"]]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.408962, 0)
|
||||
collision_layer = 25
|
||||
collision_layer = 0
|
||||
collision_mask = 0
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_aqn5t")
|
||||
_fireProjectile = ExtResource("2_e6qos")
|
||||
_altFireProjectile = ExtResource("3_wbhxk")
|
||||
_fireProjectile = ExtResource("3_wbhxk")
|
||||
_altFireProjectile = ExtResource("2_e6qos")
|
||||
_speed = 1.0
|
||||
|
||||
[node name="Pivot" type="Node3D" parent="."]
|
||||
@@ -238,8 +239,8 @@ shape = SubResource("BoxShape3D_r4spg")
|
||||
[node name="Area3D" type="Area3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.75657e-15, 1.43031, 0)
|
||||
disable_mode = 2
|
||||
collision_layer = 16
|
||||
collision_mask = 4100
|
||||
collision_layer = 0
|
||||
collision_mask = 0
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
|
||||
transform = Transform3D(0.999665, -0.0258978, -7.10543e-15, 0.0258978, 0.999665, 0, 0, 0, 1, 0, 0, 0)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Godot;
|
||||
using System.Linq;
|
||||
|
||||
public partial class CapricornControls : Character
|
||||
{
|
||||
@@ -84,10 +85,10 @@ public partial class CapricornControls : Character
|
||||
{
|
||||
IsShooting = true;
|
||||
CanShoot = false;
|
||||
var projectile = projectileScene.Instantiate<Projectile>();
|
||||
await ToSignal(GetTree().CreateTimer(projectile.Cooldown), "timeout");
|
||||
projectile.Position = Position + new Vector3(0f, 1f, 0f);
|
||||
projectile.ParentCharacter = this;
|
||||
var projectile = projectileScene.Instantiate<Node3D>();
|
||||
var projectileCooldown = projectile.GetChildren().OfType<Projectile>().First();
|
||||
await ToSignal(GetTree().CreateTimer(projectileCooldown.Cooldown), "timeout");
|
||||
projectile.Position = Position;
|
||||
GetParent().AddChild(projectile);
|
||||
CanShoot = true;
|
||||
IsShooting = false;
|
||||
|
||||
Reference in New Issue
Block a user