当前位置:网站首页>About the general input operation mode of unity
About the general input operation mode of unity
2022-07-01 01:19:00 【charlsdm】
Record Unity General input operation mode
My code is attached below
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TouchInput : MonoBehaviour
{
public float moveSpeed = 5.0f;
public float rotateSpeed = 5.0f;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
// Input.GetAxis("Horizontal");
this.transform.Translate(Vector3.forward * moveSpeed * Time.deltaTime*Input.GetAxis("Vertical"));
this.transform.Rotate(Vector3.up * rotateSpeed * Time.deltaTime * Input.GetAxis("Vertical"));
}
}
边栏推荐
猜你喜欢

Docker 部署 MySQL 8

What if the disk of datanode is full?

New content violation degree determination scana bad information monitoring capability update issue 5

Q play soft large toast to bring more comfortable sleep

解决IDEA:Class ‘XXX‘ not found in module ‘XXX‘

软硬件基础知识学习--小日记(1)

Orb-slam2 source code learning (II) map initialization

Golang treasure house recommendation

【网络丢包,网络延迟?这款神器帮你搞定所有!】

【学习笔记】构造
随机推荐
2022 is half way through. It's hard to make money
ESP8266 RC522
[network packet loss and network delay? This artifact can help you deal with everything!]
1175. Prime Arrangements
Orb-slam2 source code learning (II) map initialization
Gavin's insight on the transformer live broadcast course - rasa project's actual banking financial BOT Intelligent Business Dialogue robot system startup, language understanding, dialogue decision-mak
Parity linked list [two general directions of linked list operation]
Flutter Error: Cannot run with sound null safety, because the following dependencies don‘t support
Oracle temporary table explanation
06.论Redis持久化的几种方式
染色法判断二分图
分割链表[先取next再斩断链表防止断链]
Listview in flutter application development
DLS-42/6-4 DC110V双位置继电器
DLS-20型双位置继电器 220VDC
奇偶链表[链表操作的两种大方向]
Installing mongodb database in Windows Environment
Usage of C set
[2023 MediaTek approved the test questions in advance] ~ questions and reference answers
[learning notes] double + two points