当前位置:网站首页>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;
}
}
边栏推荐
- [groovy] closure (Introduction to closure class closure | this, owner, delegate member assignment and source code analysis)
- AutoCAD - scaling
- 3dsmax scanning function point connection drawing connection line
- PostgreSQL 超越 MySQL,“世界上最好的编程语言”薪水偏低
- [goweb development] Introduction to authentication modes based on cookies, sessions and JWT tokens
- Flutter tips: various fancy nesting of listview and pageview
- Detailed introduction of OSPF header message
- MD5绕过
- [groovy] closure (closure parameter list rule | default parameter list | do not receive parameters | receive custom parameters)
- AutoCAD - Document Management
猜你喜欢

CUDA Programming atomic operation atomicadd reports error err:msb3721, return code 1

Use assimp library to read MTL file data

Download the details and sequence of the original data access from the ENA database in EBI

3dsmax scanning function point connection drawing connection line

Unity parallax infinite scrolling background

Special information | real estate and office buildings - 22.1.9

AutoCAD - workspace settings

54. Spiral matrix & 59 Spiral matrix II ●●

Decryption function calculates "task state and lifecycle management" of asynchronous task capability

2022 thinking of Mathematical Modeling B problem of American college students / analysis of 2022 American competition B problem
随机推荐
AutoCAD - feature matching
China needle coke industry development research and investment value report (2022 Edition)
Personal required code
On-off and on-off of quality system construction
mysql审计日志归档
Use assimp library to read MTL file data
A survey of automatic speech recognition (ASR) research
MySQL audit log archiving
Unity3d learning notes
3dsmax snaps to frozen objects
Minor spanning tree
Wan broadband access technology V EPON Technology
[groovy] closure (closure as function parameter | code example)
[Chongqing Guangdong education] National Open University 2047t commercial bank operation and management reference test in autumn 2018
【acwing】240. food chain
PR first time
AutoCAD - full screen display
[goweb development] Introduction to authentication modes based on cookies, sessions and JWT tokens
mysql審計日志歸檔
Fluent objects and lists