unity3d修改模型位置

 

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class VCCameraWorkerController : MonoBehaviour
{
    public Vector3 index_position_vec3;
    // Start is called before the first frame update
    void Start()
    {
        index_position_vec3 = this.transform.localPosition;
    }

    // Update is called once per frame
    void Update()
    {
        Vector3 vcCameraVec3 = VCVRCameraController._instance1.transform.localPosition;
        
        index_position_vec3 = new Vector3(vcCameraVec3.x, vcCameraVec3.y-1.9f, 0);

        this.transform.localPosition = index_position_vec3;

    }
}

 

 

###################

posted @ 2024-01-09 22:22  西北逍遥  阅读(33)  评论(0编辑  收藏  举报