Throwing Knife Added
This commit is contained in:
@@ -51,7 +51,7 @@ namespace BITFALL.Throws
|
||||
{
|
||||
isHolding = false;
|
||||
base.Entry();
|
||||
animator.Play(BITConstant.Player.Draw);
|
||||
animator.Play(BITConstant.Player.Draw);
|
||||
}
|
||||
|
||||
private void OnThrow(InputAction.CallbackContext obj)
|
||||
@@ -82,6 +82,7 @@ namespace BITFALL.Throws
|
||||
if (!_equipmentContainer.TryUseEquip<EquipmentAsThrow>()) return;
|
||||
var instance = _assetableThrow.GetInstance();
|
||||
if (!instance.TryGetComponent<Rigidbody>(out var _rigidbody)) return;
|
||||
_rigidbody.rotation = throwPoint.rotation;
|
||||
_rigidbody.position = throwPoint.position;
|
||||
_rigidbody.AddForce(throwPoint.forward * throwForce, ForceMode.VelocityChange);
|
||||
}
|
||||
|
Reference in New Issue
Block a user