handgun #1

Merged
gauchmarc merged 15 commits from handgun into main 2023-12-15 11:12:01 +01:00
Showing only changes of commit 9525ce625c - Show all commits

View File

@ -11,7 +11,7 @@ public class iamagun : MonoBehaviour
public float kickDuration = 0.1f; // Duration of the kick animation
private AudioSource audio;
private new AudioSource audio;
private Vector3 offsetPosition;
private Quaternion offsetRotation;
@ -25,6 +25,8 @@ public class iamagun : MonoBehaviour
// Flag to check if the kick animation is active
private bool isKicking = false;
private bool isInHand = false;
// Start is called before the first frame update
void Start()
{
@ -38,6 +40,7 @@ public class iamagun : MonoBehaviour
// Update is called once per frame
void Update()
{
if (!isInHand) return;
if (OVRInput.IsControllerConnected(OVRInput.Controller.RTouch))
{
// Get the local position and rotation of the controller