Fix C# IntersectRay usage: 'exclude' is a Godot Array (#4785)

This commit is contained in:
31
2021-03-27 20:05:47 -05:00
committed by GitHub
parent 6e96d8d262
commit cc59fa2d2c

View File

@@ -182,7 +182,7 @@ collision object node:
public override void _PhysicsProcess(float delta)
{
var spaceState = GetWorld2d().DirectSpaceState;
var result = spaceState.IntersectRay(globalPosition, enemyPosition, new object[] { this });
var result = spaceState.IntersectRay(globalPosition, enemyPosition, new Godot.Collections.Array { this });
}
}
@@ -217,7 +217,7 @@ member variable:
{
var spaceState = GetWorld2d().DirectSpaceState;
var result = spaceState.IntersectRay(globalPosition, enemyPosition,
new object[] { this }, CollisionMask);
new Godot.Collections.Array { this }, CollisionMask);
}
}