当前位置:网站首页>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;
}
}
边栏推荐
- 775 Div.1 C. Tyler and strings combinatorial mathematics
- Introduction to JVM principle and process
- 中国艾草行业研究与投资前景预测报告(2022版)
- 49 pictures and 26 questions explain in detail what is WiFi?
- Decryption function calculates "task state and lifecycle management" of asynchronous task capability
- Create a pyGame window with a blue background
- 【acwing】240. food chain
- 猿人学第一题
- How much do you know about 3DMAX rendering skills and HDRI light sources? Dry goods sharing
- AutoCAD - continuous annotation
猜你喜欢

2022 U.S. college students' mathematical modeling e problem ideas / 2022 U.S. game e problem analysis

MySQL in-depth learning - index creation and deletion, index design principles, index failure scenarios, query optimization, index push down ICP

C4D simple cloth (version above R21)

Thematic information | carbon, carbon neutrality, low carbon, carbon emissions - 22.1.9

Use assimp library to read MTL file data

AutoCAD - lengthening

【acwing】837. Number of connected block points

How to choose a panoramic camera that suits you?

Panel panel of UI

The remainder operation is a hash function
随机推荐
An article takes you to thoroughly understand descriptors
PR first time
Function overloading
2021 Higher Education Club Cup mathematical modeling national tournament ABCD problem - problem solving ideas
3dsmax common commands
MySQL in-depth learning - index creation and deletion, index design principles, index failure scenarios, query optimization, index push down ICP
AutoCAD - workspace settings
Wan broadband access technology V EPON Technology
AutoCAD - full screen display
Inline built-in function
中国针状焦行业发展研究与投资价值报告(2022版)
Mode in BST (binary tree & Notes on question brushing)
質量體系建設之路的分分合合
China polyurethane rigid foam Market Research and investment forecast report (2022 Edition)
Flink集群配置
Function template
C4D simple cloth (version above R21)
[groovy] closure closure (customize closure parameters | customize a single closure parameter | customize multiple closure parameters | specify the default value of closure parameters)
2021-10-29
2022 American College Students' mathematical modeling ABCDEF problem thinking /2022 American match ABCDEF problem analysis