Player, player movement, camera control

This commit is contained in:
2024-12-07 21:48:47 +01:00
parent 54fe327198
commit 8969435fda
1052 changed files with 166612 additions and 6768 deletions

View File

@@ -0,0 +1,22 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace KinematicCharacterController.Examples
{
public class PrefabLauncher : MonoBehaviour
{
public Rigidbody ToLaunch;
public float Force;
void Update()
{
if (Input.GetKeyDown(KeyCode.Return))
{
Rigidbody inst = Instantiate(ToLaunch, transform.position, transform.rotation);
inst.AddForce(transform.forward * Force, ForceMode.VelocityChange);
Destroy(inst.gameObject, 8f);
}
}
}
}