Lighting bugfixes, setting camera position to character on shift start

This commit is contained in:
Regalis
2015-12-26 22:35:28 +02:00
parent 064e2eadd0
commit 8c032d8368
10 changed files with 49 additions and 26 deletions

View File

@@ -301,7 +301,10 @@ namespace Barotrauma
public static Body PickBody(Vector2 rayStart, Vector2 rayEnd, List<Body> ignoredBodies = null, Category? collisionCategory = null)
{
if (Vector2.DistanceSquared(rayStart, rayEnd) < 0.0f) return null;
if (Vector2.DistanceSquared(rayStart, rayEnd) < 0.00001f)
{
rayEnd += Vector2.UnitX * 0.001f;
}
float closestFraction = 1.0f;
Body closestBody = null;