📜  如何在被物体击中时停止玩家旋转 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:54.196000             🧑  作者: Mango

代码示例1
//Set freeze rotation on the rigidbody to true.  This will stop the object from
//physics calculations randomly rotating it when hitting other colliders, but 
//will still let you rotate your player by using the transform
_RigidBody2D.freezeRotation = true;