当前位置:网站首页>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;
}
}
边栏推荐
- SQLServer 存储过程传递数组参数
- Redis 排查大 key 的4种方法,优化必备
- 猿人学第一题
- jmeter -- 分布式压测
- 中国AS树脂市场调研与投资预测报告(2022版)
- Special information | real estate and office buildings - 22.1.9
- MySQL in-depth learning - index creation and deletion, index design principles, index failure scenarios, query optimization, index push down ICP
- Flutter tips: various fancy nesting of listview and pageview
- AutoCAD - set layer
- 【Leetcode】1352. Product of the last K numbers
猜你喜欢
Autocad-- dynamic zoom
AutoCAD - Center zoom
MySQL in-depth learning - index creation and deletion, index design principles, index failure scenarios, query optimization, index push down ICP
Flutter 小技巧之 ListView 和 PageView 的各种花式嵌套
次小生成树
【Leetcode】1352. Product of the last K numbers
An article takes you to thoroughly understand descriptors
Thinking of 2022 American College Students' mathematical modeling competition
Wan broadband access technology V EPON Technology
C4D simple cloth (version above R21)
随机推荐
2021 electrician Cup - high speed rail traction power supply system operation data analysis and equivalent modeling ideas + code
flutter 对象和列表
The principle of attention mechanism and its application in seq2seq (bahadanau attention)
Establish cloth effect in 10 seconds
China needle coke industry development research and investment value report (2022 Edition)
[groovy] closure closure (customize closure parameters | customize a single closure parameter | customize multiple closure parameters | specify the default value of closure parameters)
【Leetcode】1352. Product of the last K numbers
C iterator
mysql審計日志歸檔
Flutter tips: various fancy nesting of listview and pageview
SQLServer 存储过程传递数组参数
质量体系建设之路的分分合合
jmeter -- 分布式压测
Introduce Hamming distance and calculation examples
Research and forecast report on China's solution polymerized styrene butadiene rubber (SSBR) industry (2022 Edition)
Pdf to DWG in CAD
LeetCode之单词搜索(回溯法求解)
Group counting notes (1) - check code, original complement multiplication and division calculation, floating point calculation
Wenet: E2E speech recognition tool for industrial implementation
2021 Higher Education Club Cup mathematical modeling national tournament ABCD problem - problem solving ideas