Answers for "unity 2d pixels change when rotating rotation"

C#
1

how to unfreeze a rotation in a collider unity 2d

public Rigidbody2D rb;

void Start()
{
	rb.constraints = RigidbodyConstraints2D.None;
}
Posted by: Guest on May-27-2021
1

rotation unity script 2d

transform.eulerAngles = Vector3.forward * degrees;
// or
transform.rotation = Quaternion.Euler(Vector3.forward * degrees);
// or
transform.rotation = Quaternion.LookRotation(Vector3.forward, yAxisDirection);
// or
transform.LookAt(Vector3.forward, yAxisDirection);
// or
transform.right = xAxisDirection;
// or
transform.up = yAxisDirection;
Posted by: Guest on June-26-2020

C# Answers by Framework

Browse Popular Code Answers by Language