当前位置:网站首页>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"));
}
}
边栏推荐
- Dls-42/6-4 dc110v double position relay
- Training discipline principle of robot programming
- Inspire students' diversified thinking with steam Education
- Detailed analysis of operators i++ and ++i in JS, i++ and ++i
- 技术人进阶画业务大图,手把手教学来了
- Analyzing the wisdom principle in maker education practice
- Golang treasure house recommendation
- Orb-slam2 source code learning (II) map initialization
- Problem solving: how to manage thread_local pointer variables
- Usage of C set
猜你喜欢

What if the disk of datanode is full?

双位置继电器DLS-5/2 DC220V

Orb-slam2 source code learning (II) map initialization

Hoo research | coinwave production - nym: building the next generation privacy infrastructure

2021电赛F题openmv和K210调用openmv api巡线,完全开源。

The communication mechanism and extension of Supervisor

【原创】 PLSQL 索引排序优化

【学习笔记】构造

Analyzing the wisdom principle in maker education practice

Analyze the maker education path integrating the essence of discipline
随机推荐
[LeetCode] 两数之和【1】
Win11安装redis 数据库以及redis desktop manager的下载
集群与LVS介绍及原理解析
Join table query select generation
Analysis of blocktoken principle
Poor students can also play raspberry pie
XJY-220/43AC220V静态信号继电器
The longest selling mobile phone in China has been selling well since its launch, crushing iphone12
Dls-42/6-4 dc110v double position relay
NE555 waveform generator handle tutorial NE555 internal structure (I)
冲击继电器ZC-23/DC220V
JS to convert numbers into Chinese characters for output
【学习笔记】构造
Inspire students' diversified thinking with steam Education
Document service design
P4 learning - Basic tunneling
Using asyncio for concurrency
解决IDEA:Class ‘XXX‘ not found in module ‘XXX‘
pytorch编程知识(2)
A proper job is a good job