当前位置:网站首页>Unity writes a character controller. The mouse controls the screen to shake and the mouse controls the shooting
Unity writes a character controller. The mouse controls the screen to shake and the mouse controls the shooting
2022-07-04 02:27:00 【LiPing122335】
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class two: MonoBehaviour {
public GameObject _prefabBullet;
private float _angleSpeed = 120f;
void Update()
{
float eularY = Input.GetAxis("Mouse X") * _angleSpeed * Time.deltaTime;
transform.Rotate(new Vector3(0, eularY, 0));
if (Input.GetMouseButtonDown(0))
{
Instantiate(_prefabBullet, transform.position, transform.rotation);
}
}
}
边栏推荐
- Life cycle of instance variables, static variables and local variables
- Properties of binary trees (numerical aspects)
- Applet graduation project is based on wechat classroom laboratory reservation applet graduation project opening report function reference
- Small program graduation project based on wechat e-book small program graduation project opening report function reference
- Question C: Huffman tree
- Format character%* s
- Crawler practice website image batch download
- MySQL advanced (Advanced) SQL statement (I)
- Ai aide à la recherche de plagiat dans le design artistique! L'équipe du professeur Liu Fang a été embauchée par ACM mm, une conférence multimédia de haut niveau.
- 2022 R2 mobile pressure vessel filling certificate examination and R2 mobile pressure vessel filling simulation examination questions
猜你喜欢
[leetcode daily question] a single element in an ordered array
Chapter 3.4: starrocks data import - Flink connector and CDC second level data synchronization
Measurement fitting based on Halcon learning [4] measure_ arc. Hdev routine
Example 073 square sum value judgment programming requires the input of a and B, if a ²+ b ² If the result of is greater than 100, a is output ²+ b ² Value, otherwise output the result of a + B.
Advanced learning of MySQL -- Application -- storage engine
Small program graduation project based on wechat e-book small program graduation project opening report function reference
Will the memory of ParticleSystem be affected by maxparticles
3D game modeling is in full swing. Are you still confused about the future?
C learning notes: C foundation - Language & characteristics interpretation
Advanced learning of MySQL -- Application -- index
随机推荐
12. Gettimeofday() and time()
Jerry's update contact [article]
Small program graduation design is based on wechat order takeout small program graduation design opening report function reference
Latex tips slash \backslash
Setting function of Jerry's watch management device [chapter]
AI 助力藝術設計抄襲檢索新突破!劉芳教授團隊論文被多媒體頂級會議ACM MM錄用
Bugku Zhi, you have to stop him
Applet graduation project based on wechat selection voting applet graduation project opening report function reference
ZABBIX API pulls the values of all hosts of a monitoring item and saves them in Excel
Key knowledge of embedded driver
PMP daily three questions (February 14, 2022)
Global and Chinese market of cell scrapers 2022-2028: Research Report on technology, participants, trends, market size and share
High level application of SQL statements in MySQL database (I)
G3 boiler water treatment registration examination and G3 boiler water treatment theory examination in 2022
Final consistency of MESI cache in CPU -- why does CPU need cache
MySQL advanced SQL statement (1)
3D game modeling is in full swing. Are you still confused about the future?
Take you to master the formatter of visual studio code
What are the conditions for the opening of Tiktok live broadcast preview?
Global and Chinese markets of advanced X-ray inspection system (Axi) in PCB 2022-2028: Research Report on technology, participants, trends, market size and share