Answers for "how to freeze x and y position in rb2d with code unity"

C#
2

rigidbody2d freeze position

public Rigidbody2D rb;

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

how to freeze x and y position in rb2d with code unity

rb.constraints = RigidbodyConstraints2D.FreezePositionX;
            rb.constraints = RigidbodyConstraints2D.FreezePositionY;
Posted by: Guest on November-13-2020

Code answers related to "how to freeze x and y position in rb2d with code unity"

C# Answers by Framework

Browse Popular Code Answers by Language