Skip to content

Commit ee823fb

Browse files
authored
fix: teleporting below ground
1 parent de2f910 commit ee823fb

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/RestrictedActions/RestrictedActionsAPIImplementation.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,8 @@ private async UniTask OpenUrlAsync(string url)
160160

161161
private bool IsPositionValid(Vector3 floorPosition)
162162
{
163-
//Avoid teleports below ground level
164-
if(floorPosition.y < 0)
165-
return false;
163+
// Avoid teleporting below ground level
164+
floorPosition.y = Mathf.Max(floorPosition.y, 0);
166165

167166
var parcelToCheck = floorPosition.ToParcel();
168167

0 commit comments

Comments
 (0)