当前位置:网站首页>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;
}
}
边栏推荐
- 中国AS树脂市场调研与投资预测报告(2022版)
- [groovy] closure (Introduction to closure class closure | closure parametertypes and maximumnumberofparameters member usage)
- 2022 thinking of mathematical modeling C problem of American college students / analysis of 2022 American competition C problem
- Pdf to DWG in CAD
- AutoCAD -- dimension break
- "Measuring curve length" of CAD dream drawing
- Unity synergy
- 2022 U.S. college students' mathematical modeling e problem ideas / 2022 U.S. game e problem analysis
- [AI bulletin 20220211] the hard core up owner has built a lidar and detailed AI accelerator
- Thinking of 2022 American College Students' mathematical modeling competition
猜你喜欢
3dsmax scanning function point connection drawing connection line
[Business Research Report] Research Report on male consumption trends in other economic times -- with download link
计组笔记(1)——校验码、原补码乘除计算、浮点数计算
Download the details and sequence of the original data access from the ENA database in EBI
669. 修剪二叉搜索树 ●●
Unity3d learning notes
Minor spanning tree
PostgreSQL 超越 MySQL,“世界上最好的编程语言”薪水偏低
AutoCAD - Document Management
Autocad-- Real Time zoom
随机推荐
[groovy] closure (closure parameter list rule | default parameter list | do not receive parameters | receive custom parameters)
Variable category (automatic, static, register, external)
2022 thinking of mathematical modeling D problem of American college students / analysis of 2022 American competition D problem
Minor spanning tree
AutoCAD - graphic input and output
The principle of attention mechanism and its application in seq2seq (bahadanau attention)
2021-10-29
A survey of automatic speech recognition (ASR) research
jmeter -- 分布式压测
PostgreSQL 超越 MySQL,“世界上最好的编程语言”薪水偏低
Difference between singleton and factory pattern
Unity connects to the database
Thinking of 2022 American College Students' mathematical modeling competition
mysql审计日志归档
Sixth note
MySQL audit log Archive
Function overloading
Personal required code
C4D simple cloth (version above R21)
Fluent objects and lists