goodbye collisions
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://criqb4bokctlr"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://criqb4bokctlr"]
|
||||
|
||||
[ext_resource type="Script" path="res://Player/Base/Projectile.cs" id="1_6e1or"]
|
||||
[ext_resource type="Texture2D" uid="uid://cferkvvp0rjht" path="res://Textures/Projectiles/Projectile_Sagittarius.png" id="1_57flt"]
|
||||
[ext_resource type="Script" path="res://Player/Sagittarius/Attacks/MegamiBeamShot.cs" id="1_a146o"]
|
||||
[ext_resource type="AudioStream" uid="uid://m8mvw8acs5sk" path="res://Audio/SFX/Green Wave.wav" id="2_vvcho"]
|
||||
[ext_resource type="AudioStream" uid="uid://cat08h84wm5gm" path="res://Audio/SFX/ominous.wav" id="3_12vsu"]
|
||||
|
||||
[sub_resource type="Curve3D" id="Curve3D_7ok4f"]
|
||||
_data = {
|
||||
@@ -15,27 +16,28 @@ point_count = 2
|
||||
height = 9.57027
|
||||
radius = 0.57027
|
||||
|
||||
[node name="MegamiBeam" type="Node3D" node_paths=PackedStringArray("_pathFollow")]
|
||||
script = ExtResource("1_a146o")
|
||||
_pathFollow = NodePath("Path3D/PathFollow3D")
|
||||
_soundEffect = ExtResource("2_vvcho")
|
||||
Cooldown = 3.0
|
||||
_projectileSpeed = 3.0
|
||||
_soundEffect = ExtResource("2_vvcho")
|
||||
[node name="MegamiBeam" type="Node3D"]
|
||||
|
||||
[node name="Path3D" type="Path3D" parent="."]
|
||||
[node name="Path3D" type="Path3D" parent="." node_paths=PackedStringArray("_hitBox")]
|
||||
top_level = true
|
||||
curve = SubResource("Curve3D_7ok4f")
|
||||
script = ExtResource("1_6e1or")
|
||||
Cooldown = 2.0
|
||||
_projectileSpeed = 3.0
|
||||
_soundEffect = ExtResource("2_vvcho")
|
||||
_onHitSfx = ExtResource("3_12vsu")
|
||||
_hitBox = NodePath("PathFollow3D/Beam")
|
||||
HasRotation = true
|
||||
|
||||
[node name="PathFollow3D" type="PathFollow3D" parent="Path3D"]
|
||||
transform = Transform3D(-0.999999, 0, 0.000800045, 0, 1, 0, -0.000800045, 0, -0.999999, 0, 1, 0)
|
||||
transform = Transform3D(0.999999, 0, -0.000799999, 0, 1, 0, 0.000799999, 0, 0.999999, 0, 1, 0)
|
||||
loop = false
|
||||
tilt_enabled = false
|
||||
|
||||
[node name="Beam" type="RigidBody3D" parent="Path3D/PathFollow3D"]
|
||||
transform = Transform3D(-1, 0, -8.74229e-08, 0, 1, 0, 8.74229e-08, 0, -1, 0, 0, 0)
|
||||
collision_layer = 34
|
||||
collision_mask = 34
|
||||
collision_layer = 0
|
||||
collision_mask = 0
|
||||
gravity_scale = 0.0
|
||||
continuous_cd = true
|
||||
max_contacts_reported = 1000
|
||||
@@ -43,10 +45,12 @@ contact_monitor = true
|
||||
can_sleep = false
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Path3D/PathFollow3D/Beam"]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
|
||||
transform = Transform3D(0.5, 0, 5.82077e-11, 0, 0.5, 0, -5.82077e-11, 0, 0.5, 0.000155393, 0, 0.194262)
|
||||
shape = SubResource("CylinderShape3D_bnunv")
|
||||
|
||||
[node name="Sprite3D2" type="Sprite3D" parent="Path3D/PathFollow3D/Beam"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00355998, 0, 0.140453)
|
||||
transform = Transform3D(-1, 0, 0.000663249, 0, 1, 0, -0.000663249, 0, -1, -0.00355998, 0, 0.140453)
|
||||
axis = 1
|
||||
texture = ExtResource("1_57flt")
|
||||
|
||||
[connection signal="body_entered" from="Path3D/PathFollow3D/Beam" to="Path3D" method="OnProjectileHit"]
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
using Godot;
|
||||
using System.Linq;
|
||||
|
||||
public partial class MegamiBeamShot : Projectile
|
||||
{
|
||||
[Export]
|
||||
private PathFollow3D _pathFollow;
|
||||
[Export]
|
||||
public new AudioStream _soundEffect;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
_pathFollow = GetNode<PathFollow3D>("Path3D/PathFollow3D");
|
||||
_pathFollow.GetParentNode3D().Rotation = ParentCharacter.GetNode<Node3D>("Pivot").Rotation;
|
||||
var sfxPlayer = GetTree().Root.GetNode<AudioStreamPlayer>("Main/SFXPlayer");
|
||||
sfxPlayer.Stream = _soundEffect;
|
||||
sfxPlayer.Play();
|
||||
}
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
_pathFollow.Progress += 10f * (float)delta;
|
||||
if (Mathf.IsEqualApprox(_pathFollow.ProgressRatio, 1.0f))
|
||||
QueueFree();
|
||||
}
|
||||
|
||||
private void OnBulletHitObject(Node node)
|
||||
{
|
||||
QueueFree();
|
||||
}
|
||||
}
|
||||
@@ -607,7 +607,8 @@ radius = 0.25
|
||||
|
||||
[node name="Sagittarius" type="CharacterBody3D" groups=["Player"]]
|
||||
transform = Transform3D(0.9, 0, 0, 0, 0.9, 0, 0, 0, 0.9, 0, 0.559088, 0)
|
||||
collision_layer = 25
|
||||
collision_layer = 0
|
||||
collision_mask = 0
|
||||
motion_mode = 1
|
||||
wall_min_slide_angle = 3.14159
|
||||
script = ExtResource("1_s1hsr")
|
||||
@@ -618,8 +619,8 @@ _altFireProjectile = ExtResource("2_c3ma7")
|
||||
|
||||
[node name="Area3D" type="Area3D" parent="Pivot"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.75657e-15, 0, 0)
|
||||
collision_layer = 16
|
||||
collision_mask = 4100
|
||||
collision_layer = 0
|
||||
collision_mask = 0
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pivot/Area3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.125003, 0.637504, 0.112771)
|
||||
|
||||
Reference in New Issue
Block a user