0
Q:

rigidbody freeze position through code

public Rigidbody2D rb;

void Start()
{
	rb.constraints = RigidbodyConstraints2D.FreezeAll;
}
1
 rigidbody.constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationZ;
0

New to Communities?

Join the community