1
This commit is contained in:
16
Unity/Scripts/Physics/PhysicsHelper.cs
Normal file
16
Unity/Scripts/Physics/PhysicsHelper.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Cysharp.Threading.Tasks;
|
||||
namespace BITKit
|
||||
{
|
||||
public static class PhysicsHelper
|
||||
{
|
||||
public static async void AddForceAtPositionAsync(this Rigidbody rigidbody, Vector3 force, Vector3 position)
|
||||
{
|
||||
await UniTask.DelayFrame(8);
|
||||
if (rigidbody is not null)
|
||||
rigidbody.AddForceAtPosition(force, position);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user