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.
 
 
 
 
 

19 lines
486 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DirectionRuler : MonoBehaviour {
public GameObject ruler;
private float direction_;
public Transform camera_;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
direction_ = (2115f - 395f) / 360f * camera_.localEulerAngles.y + 395f;
ruler.transform.localPosition = new Vector3(direction_, 8f,0f);
}
}