[英]Unity2D: How to rotate arm with mouse
i am currently working on a 2D project, i want to rotate an arm on my character, the arm is indeed a separate sprite, from the body of the player.我目前正在做一个 2D 项目,我想在我的角色上旋转手臂,手臂确实是一个独立的精灵,与玩家的身体分开。
I have a working script the rotate the arm perfectly but, the whole arm is rotating around a point in the middle of the arm, i want to rotate the arm from the shoulder, any ideas on how to do that?我有一个可以完美旋转手臂的工作脚本,但是,整个手臂都围绕手臂中间的一个点旋转,我想从肩部旋转手臂,关于如何做到这一点的任何想法?
The pivot point of your sprite is set to center rather than the end where the shoulder is located.精灵的枢轴点设置为中心而不是肩部所在的末端。 You can use the sprite editor to change the pivot.
您可以使用精灵编辑器更改枢轴。 Below is a quick step by step on editing the pivot.
下面是编辑枢轴的快速一步一步。 You can also find the information here -> https://docs.unity3d.com/Manual/SpriteEditor.html
您也可以在这里找到信息 -> https://docs.unity3d.com/Manual/SpriteEditor.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.