Rotate bullet pattern to face parent

This commit is contained in:
Marco 2025-07-09 12:00:23 +02:00
commit 7d267c406d
19 changed files with 1325 additions and 1245 deletions

View file

@ -332,9 +332,13 @@ public partial class Bullet3D : Area3D, IBullet
Destroy();
}
private readonly StringName SolidGroup = "Solid";
private readonly StringName PermeableGroup = "Permeable";
private readonly StringName DestroyableGroup = "Destroyable";
private void _on_body_entered(Node3D body)
{
if (body.IsInGroup("Destroyable") && body is IDestructible destructible &&
if (body.IsInGroup(DestroyableGroup) && body is IDestructible destructible &&
CanHit(BulletOwner, destructible.BulletGroup))
{
// hit
@ -344,7 +348,7 @@ public partial class Bullet3D : Area3D, IBullet
return;
}
if (body.IsInGroup("Solid"))
if (body.IsInGroup(SolidGroup) && !body.IsInGroup(PermeableGroup))
{
//Debug.WriteLine("Collision");
RequestCollisionDestruction();