TheKingsRace/Assets/Scripts/PlayerScripts/MovementAbilities/Kick.cs
Melbyj1125 702bb555f0 Implemented Item Scripts into objects
Implemented Ragdoll kinda
There are some issues with getting hit while ragdolling that need to be
fixed
Adjusted Dash
Dash still needs some adjustments before being fully implemented
2021-10-25 03:38:56 -05:00

26 lines
613 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Kick : MonoBehaviour
{
private float kickForce = 50f;
// Start is called before the first frame update
void Start(){
}
// Update is called once per frame
void Update(){
}
private void OnCollisionEnter(Collision collision)
{
if (collision.transform.CompareTag("kickable")){
Vector3 direction = this.transform.forward;
Debug.Log(direction);
collision.rigidbody.AddForce(direction * kickForce, ForceMode.Impulse);
}
}
}