Skip to content

Commit

Permalink
adding back offset to PlaceObjectAtPoint
Browse files Browse the repository at this point in the history
-some objects when placed exactly flush with a surface failed the checkSpawnArea check. Adding this slight offset to catch those cases.
  • Loading branch information
winthos committed Aug 31, 2020
1 parent acc4c23 commit 53b3ab5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unity/Assets/Scripts/PhysicsRemoteFPSAgentController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3347,7 +3347,7 @@ public void PlaceObjectAtPoint(ServerAction action)

float distFromSopToBottomPoint = Vector3.Distance(bottomPoint, target.transform.position);

float offset = distFromSopToBottomPoint;
float offset = distFromSopToBottomPoint + 0.005f;//offset in case the surface below isn't completely flat

Vector3 finalPos = GetSurfacePointBelowPosition(action.position) + new Vector3(0, offset, 0);

Expand Down

0 comments on commit 53b3ab5

Please sign in to comment.