You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
3.3 KiB
C#
92 lines
3.3 KiB
C#
|
3 years ago
|
//using System.Collections;
|
||
|
|
//using System.Collections.Generic;
|
||
|
|
//using UnityEngine;
|
||
|
|
//using MalbersAnimations.Events;
|
||
|
|
//using UnityEngine.Events;
|
||
|
|
//using Invector.vCharacterController;
|
||
|
|
//using Invector.vCamera;
|
||
|
|
//using MalbersAnimations.Scriptables;
|
||
|
|
//using Gaia;
|
||
|
|
|
||
|
|
//using SiegeSong;
|
||
|
|
|
||
|
|
//namespace SiegeSong
|
||
|
|
//{
|
||
|
|
// public class CameraCustomizations : MonoBehaviour
|
||
|
|
// {
|
||
|
|
// public vThirdPersonCamera PlayerCamera;
|
||
|
|
// public SkinnedMeshRenderer BodyMeshRenderer;
|
||
|
|
// public Mesh ThirdPersonBodyMesh;
|
||
|
|
// public Mesh FirstPersonBodyMesh;
|
||
|
|
// public vThirdPersonMotor PlayerMotor;
|
||
|
|
// public vThirdPersonController PlayerController;
|
||
|
|
// public Rigidbody PlayerRigidbody;
|
||
|
|
// public GameObject PlayerWrapper;
|
||
|
|
// public float VelocityThreshhold = 0.0f;
|
||
|
|
// public float perspectiveSwitchCooldown = 0.25f;
|
||
|
|
// public string CameraChangeInput = "RightAnalogClick";
|
||
|
|
// public string firstPersonCameraState = "First Person";
|
||
|
|
// public string thirdPersonCameraState = "Third Person";
|
||
|
|
// public GameObject[] HiddenFirstPersonMeshes;
|
||
|
|
// private bool firstPersonActive = false;
|
||
|
|
// private float perspectiveSwitchTimer = 0.0f;
|
||
|
|
// private bool perspectiveSwitchTimerActive = false;
|
||
|
|
|
||
|
|
|
||
|
|
// void Start()
|
||
|
|
// {
|
||
|
|
|
||
|
|
// }
|
||
|
|
|
||
|
|
// void Update()
|
||
|
|
// {
|
||
|
|
// if (Input.GetButtonDown(CameraChangeInput))
|
||
|
|
// {
|
||
|
|
// if (firstPersonActive)
|
||
|
|
// {
|
||
|
|
// PlayerController.isFirstPerson = false;
|
||
|
|
// firstPersonActive = false;
|
||
|
|
// PlayerCamera.ChangeState(thirdPersonCameraState, true);
|
||
|
|
|
||
|
|
// //FirstPersonBodyMesh.CopyBonesFrom(ThirdPersonBodyMesh);
|
||
|
|
// //BodyMeshRenderer.sharedMesh = FirstPersonBodyMesh;
|
||
|
|
|
||
|
|
|
||
|
|
// foreach (var hiddenFirstPersonMesh in HiddenFirstPersonMeshes)
|
||
|
|
// {
|
||
|
|
// hiddenFirstPersonMesh.active = true;
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
// else
|
||
|
|
// {
|
||
|
|
// PlayerController.isFirstPerson = true;
|
||
|
|
// firstPersonActive = true;
|
||
|
|
// PlayerCamera.ChangeState(firstPersonCameraState, true);
|
||
|
|
|
||
|
|
// //ThirdPersonBodyMesh.CopyBonesFrom(FirstPersonBodyMesh);
|
||
|
|
// //BodyMeshRenderer.sharedMesh = ThirdPersonBodyMesh;
|
||
|
|
|
||
|
|
|
||
|
|
// foreach (var hiddenFirstPersonMesh in HiddenFirstPersonMeshes)
|
||
|
|
// {
|
||
|
|
// hiddenFirstPersonMesh.active = false;
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
// if (PlayerRigidbody.velocity.x > VelocityThreshhold ||
|
||
|
|
// PlayerRigidbody.velocity.y > VelocityThreshhold ||
|
||
|
|
// PlayerRigidbody.velocity.z > VelocityThreshhold ||
|
||
|
|
// PlayerRigidbody.velocity.x < VelocityThreshhold ||
|
||
|
|
// PlayerRigidbody.velocity.y < VelocityThreshhold ||
|
||
|
|
// PlayerRigidbody.velocity.z < VelocityThreshhold)
|
||
|
|
// {
|
||
|
|
// PlayerMotor.strafeSpeed.rotateWithCamera = true;
|
||
|
|
// }
|
||
|
|
// else
|
||
|
|
// {
|
||
|
|
// PlayerMotor.strafeSpeed.rotateWithCamera = false;
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
//}
|