当前位置:网站首页>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);
}
}
}
边栏推荐
- IPv6 experiment
- G3 boiler water treatment registration examination and G3 boiler water treatment theory examination in 2022
- How to subcontract uniapp and applet, detailed steps (illustration) # yyds dry goods inventory #
- What are the conditions for the opening of Tiktok live broadcast preview?
- Small program graduation design is based on wechat order takeout small program graduation design opening report function reference
- LV1 previous life archives
- Design and implementation of redis 7.0 multi part AOF
- 17. File i/o buffer
- ZABBIX API pulls the values of all hosts of a monitoring item and saves them in Excel
- It's corrected. There's one missing < /script >, why doesn't the following template come out?
猜你喜欢
[leetcode daily question] a single element in an ordered array
Introduction to graphics: graphic painting (I)
Bacteriostatic circle scanning correction template
Advanced learning of MySQL -- Application -- storage engine
What is the intelligent monitoring system of sewage lifting pump station and does it play a big role
Pagoda SSL can't be accessed? 443 port occupied? resolvent
Pytoch residual network RESNET
Mysql-15 aggregate function
false sharing
Small program graduation project based on wechat e-book small program graduation project opening report function reference
随机推荐
16. System and process information
Properties of binary trees (numerical aspects)
Database concept and installation
It's corrected. There's one missing < /script >, why doesn't the following template come out?
From the 18th line to the first line, the new story of the network security industry
Global and Chinese markets for electroencephalogram (EEG) devices 2022-2028: Research Report on technology, participants, trends, market size and share
When tidb meets Flink: tidb efficiently enters the lake "new play" | tilaker team interview
Mysql to PostgreSQL real-time data synchronization practice sharing
17. File i/o buffer
Global and Chinese market of box seals 2022-2028: Research Report on technology, participants, trends, market size and share
Save Private Ryan - map building + voltage dp+deque+ shortest circuit
The "message withdrawal" of a push message push, one click traceless message withdrawal makes the operation no longer difficult
Libcblas appears when installing opencv import CV2 so. 3:cannot open shared object file:NO such file or directory
3D game modeling is in full swing. Are you still confused about the future?
When the watch system of Jerry's is abnormal, it is used to restore the system [chapter]
Final consistency of MESI cache in CPU -- why does CPU need cache
ZABBIX API pulls the values of all hosts of a monitoring item and saves them in Excel
Global and Chinese market for travel wheelchairs 2022-2028: Research Report on technology, participants, trends, market size and share
Jerry's update contact [article]
Question d: Haffman coding