当前位置:网站首页>C # perspective following
C # perspective following
2022-07-05 04:54:00 【yaohuiyaoo】
using UnityEngine;
using System.Collections;
public class CameraShareScript : MonoBehaviour
{
// The distance of the camera from the object to be followed
Vector3 Dir;
// The object to follow
public GameObject m_Player;
// Use this for initialization
void Start ()
{
// Get the distance between the camera and the object to follow
Dir = m_Player.transform.position - transform.position;
}
// Update is called once per frame
void LateUpdate ()
{
// The location of the camera
transform.position = m_Player.transform.position - Dir;
}
}
边栏推荐
- AutoCAD - graphic input and output
- The remainder operation is a hash function
- 质量体系建设之路的分分合合
- 669. 修剪二叉搜索树 ●●
- Private collection project practice sharing [Yugong series] February 2022 U3D full stack class 006 unity toolbar
- 2021 Higher Education Club Cup mathematical modeling national tournament ABCD problem - problem solving ideas
- Chapter 6 text processing tools for shell programming (awk)
- 2022 thinking of mathematical modeling C problem of American college students / analysis of 2022 American competition C problem
- 775 Div.1 C. Tyler and strings combinatorial mathematics
- AutoCAD - scaling
猜你喜欢
PostgreSQL 超越 MySQL,“世界上最好的编程语言”薪水偏低
AutoCAD - continuous annotation
2022 thinking of mathematical modeling a problem of American college students / analysis of 2022 American competition a problem
質量體系建設之路的分分合合
Emlog博客主题模板源码简约好看响应式
Wan broadband access technology V EPON Technology
xss注入
2021 Higher Education Club Cup mathematical modeling national tournament ABCD problem - problem solving ideas
AutoCAD - window zoom
质量体系建设之路的分分合合
随机推荐
2022 U.S. college students' mathematical modeling e problem ideas / 2022 U.S. game e problem analysis
Interface joint commissioning test script optimization V5.0 (end)
Decryption function calculates "task state and lifecycle management" of asynchronous task capability
Data security -- 14 -- Analysis of privacy protection governance
PostgreSQL surpasses mysql, and the salary of "the best programming language in the world" is low
[AI bulletin 20220211] the hard core up owner has built a lidar and detailed AI accelerator
On-off and on-off of quality system construction
Pdf to DWG in CAD
Unity get component
MD5 bypass
2021 electrician cup idea + code - photovoltaic building integration plate index development trend analysis and prediction: prediction planning issues
An article takes you to thoroughly understand descriptors
AutoCAD - continuous annotation
54. Spiral matrix & 59 Spiral matrix II ●●
2022 thinking of mathematical modeling a problem of American college students / analysis of 2022 American competition a problem
The first topic of ape Anthropology
中国溶聚丁苯橡胶(SSBR)行业研究与预测报告(2022版)
3dsmax snaps to frozen objects
【acwing】528. cheese
次小生成树