This commit is contained in:
CortexCore
2023-10-20 19:31:12 +08:00
parent 5cd094ed9a
commit a160813262
1878 changed files with 630581 additions and 4485 deletions

View File

@@ -1,3 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@@ -9,8 +10,12 @@ namespace BITKit
public static async UniTask AddForceAtPositionAsync(this Rigidbody rigidbody, Vector3 force, Vector3 position,ForceMode forceMode=ForceMode.Force)
{
await UniTask.DelayFrame(8);
if (rigidbody is not null)
rigidbody.AddForceAtPosition(force, position,forceMode);
try
{
rigidbody.AddForceAtPosition(force, position,forceMode);
}
catch(MissingReferenceException){}
}
}
}