Use nearest edge for interaction range (#11660)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -22,6 +22,8 @@ namespace Content.IntegrationTests.Tests.Interaction
|
||||
|
||||
private const float InteractionRangeDivided15Times3 = InteractionRangeDivided15 * 3;
|
||||
|
||||
private const float HumanRadius = 0.35f;
|
||||
|
||||
[Test]
|
||||
public async Task EntityEntityTest()
|
||||
{
|
||||
@@ -74,7 +76,7 @@ namespace Content.IntegrationTests.Tests.Interaction
|
||||
Assert.True(interactionSys.InRangeUnobstructed(mapCoordinates, origin));
|
||||
|
||||
// Move them out of range
|
||||
sEntities.GetComponent<TransformComponent>(origin).LocalPosition += _interactionRangeDivided15X;
|
||||
sEntities.GetComponent<TransformComponent>(origin).LocalPosition += new Vector2(InteractionRangeDivided15 + HumanRadius * 2f, 0f);
|
||||
|
||||
// Entity <-> Entity
|
||||
Assert.False(interactionSys.InRangeUnobstructed(origin, other));
|
||||
|
||||
Reference in New Issue
Block a user