资源简介
SteamVR点击菜单键控制手柄和枪的模型的切换
代码片段和文件信息
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Show : MonoBehaviour {
public bool isShowGun = false; //是否显示枪
SteamVR_TrackedController steamVR_TrackedController; //手柄按键控制类
public Gameobject gun; //枪
public Gameobject model; //手柄
void showGun(){ //显示枪
gun.SetActive (true);
model.SetActive (false);
}
void showModel(){ //显示手柄
gun.SetActive (false);
model.SetActive (true);
}
// Use this for initialization
void Start () {
steamVR_TrackedController = GetComponent
评论
共有 条评论