Initial commit

This commit is contained in:
2026-02-18 00:08:49 +02:00
commit 5105b6b060
1270 changed files with 513010 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerKick : MonoBehaviour
{
[SerializeField] private float kickForce = 8f;
private void OnControllerColliderHit(ControllerColliderHit hit)
{
if (hit.collider.CompareTag("Ball"))
{
Rigidbody rb = hit.collider.GetComponent<Rigidbody>();
if (rb != null)
{
Vector3 direction = hit.moveDirection;
direction.y = 0.3f;
rb.AddForce(direction * kickForce, ForceMode.Impulse);
}
}
}
}