using UnityEngine; using System.Collections; using Box2D.Dynamics; public class BodyGameObj : MonoBehaviour { public b2Body body; void Start () { } void Update () { Vector3 pos = transform.localPosition; pos.x = body.GetPosition ().x; pos.y = body.GetPosition ().y; transform.localPosition = pos; transform.localRotation = Quaternion.Euler(, , body.GetAngle () * 57.3f); } }
相关文章
- 指定位置打开Jupyter Notebook
- Python 识别图片上标点位置
- 用 label 控制 Pod 的位置 - 每天5分钟玩转 Docker 容器技术(128)
- Android 集成GoogleMap,实现定位和获取位置信息
- python画笔初始位置_turtle绘画-移动落笔点(改变初始原点)
- linux 如何查看某个库是否安装以及安装位置,dpkg 详解,dpkg 查看对应的库安装路径命令
- 在ubuntu中使用dpkg -i 安装软件, 软件安装的位置在哪里?
- python pip安装的包放在哪里(site-packages目录的位置)
- UE4中使用c++ 修改Actor面朝向、绕固定轴旋转
- qt 控件设置相对位置_qt 手动设置控件的位置