VR模拟枪支打靶,消灭鬼怪,换弹以及上弦等等硬核枪支操作。 使用HTCVive设备,开启SteamVR进行游玩。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

28 lines
787 B

using System;
using UnityEngine;
namespace UnityStandardAssets.Cameras
{
public abstract class PivotBasedCameraRig : AbstractTargetFollower
{
// This script is designed to be placed on the root object of a camera rig,
// comprising 3 gameobjects, each parented to the next:
// Camera Rig
// Pivot
// Camera
protected Transform m_Cam; // the transform of the camera
protected Transform m_Pivot; // the point at which the camera pivots around
protected Vector3 m_LastTargetPosition;
protected virtual void Awake()
{
// find the camera in the object hierarchy
m_Cam = GetComponentInChildren<Camera>().transform;
m_Pivot = m_Cam.parent;
}
}
}