mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-14 00:35:54 +00:00
3D Cameras with sweep and animation
This commit is contained in:
parent
4cc7a0c004
commit
7e76edc153
48 changed files with 3211 additions and 1511 deletions
|
|
@ -74,42 +74,6 @@ public partial class Destructible3D : StaticBody3D, IDestructible
|
|||
explosion.Initialize(ExplosionData.MakeBullet(new Vector2(this.GlobalPosition.X, this.GlobalPosition.Y)));
|
||||
}
|
||||
|
||||
// private void ApplyExplosionDamage()
|
||||
// {
|
||||
// var spaceState = GetWorld2D().DirectSpaceState;
|
||||
// var query = new PhysicsShapeQueryParameters2D();
|
||||
// var shape = new CircleShape2D { Radius = ExplosionRadius };
|
||||
//
|
||||
// query.SetShape(shape);
|
||||
// query.Transform = new Transform2D(0, GlobalPosition);
|
||||
// query.CollideWithBodies = false;
|
||||
// query.CollideWithAreas = true;
|
||||
// //query.CollisionMask = ;
|
||||
//
|
||||
// var results = spaceState.IntersectShape(query);
|
||||
//
|
||||
// GD.Print($"Shapes in range: {results.Count}");
|
||||
//
|
||||
// foreach (var result in results)
|
||||
// {
|
||||
// if (result.TryGetValue("collider", out var colliderObj))
|
||||
// {
|
||||
//
|
||||
// var collider = colliderObj.As<Node2D>();
|
||||
//
|
||||
//
|
||||
// if (collider.GetParent<Area2D>() is IDestructible destructible)
|
||||
// {
|
||||
// GD.Print($"HITTING {collider.Name}");
|
||||
// destructible.Hit(ExplosionDamage);
|
||||
// }
|
||||
// else {
|
||||
// GD.Print($"Collider {collider.Name} was not idestructible");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
private void CreateDebris()
|
||||
{
|
||||
if (DebrisScene == null) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue