Answers for "rigidbody2d freeze position"

C#
2

rigidbody2d freeze position

public Rigidbody2D rb;

void Start()
{
	rb.constraints = RigidbodyConstraints2D.FreezeAll;
}
Posted by: Guest on July-16-2020
3

rigidbody freeze position through code

rigidbody.constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationZ;
Posted by: Guest on August-15-2020

C# Answers by Framework

Browse Popular Code Answers by Language