Skip to content

Instantly share code, notes, and snippets.

@iwashihead
Created July 9, 2015 18:54
Show Gist options
  • Save iwashihead/3231c68968afc0e3c6d7 to your computer and use it in GitHub Desktop.
Save iwashihead/3231c68968afc0e3c6d7 to your computer and use it in GitHub Desktop.
[Unity]物理挙動の停止
public class Player : MonoBehabiour {
public void Start()
{
// 物体の停止
rigidbody.velocity = Vector3.zero; // 3Dの場合
rigidbody2D.velocity = Vector2.zero; // 2Dの場合
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment