mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-09 16:25:55 +00:00
Rotate bullet pattern to face parent
This commit is contained in:
parent
ed86ffd184
commit
7d267c406d
19 changed files with 1325 additions and 1245 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue