当前位置:网站首页>Rigidbody2d rotate around a fixed point rotate
Rigidbody2d rotate around a fixed point rotate
2022-06-09 04:05:00 【KillJUMP】
public void rotateRigidBodyAroundPointBy(Rigidbody rb, Vector3 origin, Vector3 axis, float angle) { Quaternion q = Quaternion.AngleAxis(angle, axis); rb.MovePosition(q * (rb.transform.position - origin) + origin); rb.MoveRotation(rb.transform.rotation * q); }
hold Rigidbody rb Change it to Rigidbody2D rb That is to say
Personal test Very easy to use !
There are several other ways :
1. Use animation hinge
2. Create parent object rotate parent object and delete parent object
边栏推荐
- Generics and decorators for typescript
- 《Attention-ocr-Chinese-Version-mas # ter》代码运行逻辑
- 扩展芯片,hisi3559av100 i2c调试
- 『C语言』面试管:说下各个字符串函数功能,我:不知道。面试官:小伙子学会了再来面试吧。
- 测试网站搭建+渗透+审计之第二篇渗透测试
- 域名解析(公网)
- Today in history: kubernetes open source version released; Worldofwarcraft landed in China; The inventor of packet switching network was born
- Dart:基础
- [share] network packet loss fault handling scheme
- Lead the team. Is your boss "dictatorial"? (deeply touched)
猜你喜欢

Pdf to word based on pyqt5

OpenInfra基金会发起“定向基金”计划,推行成功开源治理经验

人才缺口50万以上,平均薪资20K?网络安全,测试员的下一个风口~

基于PyQt5完成的图转文功能

Matting function based on pyqt5 - program implementation

2022年【电商】测试优惠券如何编写测试用例?

汇编:CPU结构 - FLAG标志寄存器和相关指令

OnlineJudge使用说明

基于PyQt5完成的抠图功能-程序实现

The students of Turing class of Peking University won the first place in the global undergraduate competition and solved the EDA "neck sticking" technical problem!
随机推荐
On June 12, MSG enterprise bank focused on Langfang AI enterprises to promote the integrated development of "double chain"
Generics and decorators for typescript
Matting interface based on pyqt5
基于OpenCV的人脸检测、训练、识别
瑞芯微rk3399开发板底板原理分析
Matting function based on pyqt5 - program implementation
强烈推荐这款神器,一行命令将网页转PDF!
JVM memory view and setting ideas
PHP deserialization recurrence - no response to the bugku login
Gradle 渠道包配置
VGA display of color bar, character and picture based on FPGA
[软件工具][教程]一个很好用的可以将csdn博客文章导出word的工具使用教程
基于FPGA的VGA显示彩条、字符、图片
Error 5 occurred in the console input command net start MySQL console output system. Access denied. MySQL service is starting MySQL service failed to start. The service did not report any errors. Plea
Software Test Engineer, to what extent can I get 1W in a month?
ACM tutorial - Hill sort
在线摩斯密码在线翻译转换工具
Dapr 1.7 之 Unix Domain socket 他来了
php反序列化复现——bugku 点login没反应
Noc-sla acquisition C-side business monitoring practice
https://answers.unity.com/questions/514863/swining-a-rigidbody-around-a-point.html