当前位置:网站首页>Unity_物体自转
Unity_物体自转
2022-08-09 19:20:00 【不可_收_圾】
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class 物体自转 : MonoBehaviour
{
[SerializeField]
private float speed = 0.005f; //旋转速度
void Start()
{
}
void Update()
{
this.transform.Rotate(new Vector3(1, 0, 0)*speed, Space.World);
//物体绕X轴进行自转
}
}
挂载到要自转的物体
边栏推荐
猜你喜欢
随机推荐
C语言之实现倒置字符串的两种方法
IS31FL3737B general 12 x 12 LED drive 40 QFN I2C 42 ma
WPF中加载并使用图像资源
Application of Acrel5000web Energy Consumption System in a College-Susie Week
华为云创新中心助力启泰智能 补齐中小模具企业数字化能力短板
hdu 1285 确定比赛名次(拓扑排序)
SqlServer 2016 备份和还原
嵌入式开发:使用FILL提高代码完整性
laravel 中配置文件.env解读
字节一面:TCP 和 UDP 可以使用同一个端口吗?
一种基于连接和安全熵的网络空间整体安全认识和方法
Reverse Analysis of Unknown Cryptographic Protocol Based on Network Data Flow
奥特曼卡牌隐藏的百亿市场
Ali Ermi: Without accept, can a TCP connection be established?
如何在WPF中设置Grid ColumnDefinitions的样式
如何从800万数据中快速捞出自己想要的数据?
新起之秀 DPU,正在掀起数据中心变革!
Laravel之队列「建议收藏」
移动端,PC端,微信等常用平台和浏览器判断
Beat the interviewer, the CURD system can also make technical content