当前位置:网站首页>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;
}
}
边栏推荐
- Is $20billion a little less? Cisco is interested in Splunk?
- [groovy] closure closure (customize closure parameters | customize a single closure parameter | customize multiple closure parameters | specify the default value of closure parameters)
- Decryption function calculates "task state and lifecycle management" of asynchronous task capability
- Function template
- On-off and on-off of quality system construction
- Flutter tips: various fancy nesting of listview and pageview
- AutoCAD - full screen display
- Séparation et combinaison de la construction du système qualité
- MD5绕过
- Autocad-- Real Time zoom
猜你喜欢
Wenet: E2E speech recognition tool for industrial implementation
Looking at Chinese science and technology from the Winter Olympics: what is the mystery of the high-speed camera that the whole people thank?
Unity parallax infinite scrolling background
[goweb development] Introduction to authentication modes based on cookies, sessions and JWT tokens
A survey of automatic speech recognition (ASR) research
AutoCAD - full screen display
xss注入
介绍汉明距离及计算示例
AutoCAD - isometric annotation
The remainder operation is a hash function
随机推荐
English topic assignment (26)
Introduce Hamming distance and calculation examples
Flutter tips: various fancy nesting of listview and pageview
669. 修剪二叉搜索树 ●●
LeetCode之单词搜索(回溯法求解)
[groovy] closure (Introduction to closure class closure | closure parametertypes and maximumnumberofparameters member usage)
AutoCAD - workspace settings
Personal required code
3dsmax snaps to frozen objects
Solution of circular dependency
3dsmax common commands
2022 American College Students' mathematical modeling ABCDEF problem thinking /2022 American match ABCDEF problem analysis
2021 Higher Education Club Cup mathematical modeling national tournament ABCD problem - problem solving ideas
54. 螺旋矩阵 & 59. 螺旋矩阵 II ●●
54. Spiral matrix & 59 Spiral matrix II ●●
MySQL audit log Archive
A survey of automatic speech recognition (ASR) research
CUDA Programming atomic operation atomicadd reports error err:msb3721, return code 1
China polyurethane rigid foam Market Research and investment forecast report (2022 Edition)
Research and investment forecast report of adamantane industry in China (2022 Edition)