Cleaned up code

Slide Works again
Ragdoll works again
Cam is stable
New Debugging prefab
This commit is contained in:
Melbyj1125
2021-11-03 14:06:19 -05:00
parent 76cd66fa0b
commit 7c72259708
36 changed files with 2193 additions and 346 deletions

View File

@@ -0,0 +1,26 @@
using System.Collections;
using System.Collections.Generic;
using MLAPI;
using UnityEngine;
public class dPlayCam : NetworkBehaviour
{
public GameObject player;
private Vector3 offset;
private Vector3 rad;
void Start ()
{
rad = (transform.position - player.transform.position);
}
void Update ()
{
if (!IsLocalPlayer) { return; }
offset = transform.parent.forward * rad.magnitude;
transform.position = new Vector3((player.transform.position.x - offset.x),((player.transform.position.y - offset.y)+2),(player.transform.position.z - offset.z));
}
}