かずきのBlog@hatena

すきな言語は C# + XAML の組み合わせ。Azure Functions も好き。最近は Go 言語勉強中。日本マイクロソフトで働いていますが、ここに書いていることは個人的なメモなので会社の公式見解ではありません。

Unityで動いてる物体を完全に止める方法

メモ。

targetGameObjectの動きを止める場合。

targetGameObject.rigidbody.velocity = Vector3.zero;
targetGameObject.rigidbody.angularVelocity = Vector3.zero;