“единство жестко замораживает все” Ответ

Жесткое положение 2D замораживание

public Rigidbody2D rb;

void Start()
{
	rb.constraints = RigidbodyConstraints2D.FreezeAll;
}
Comfortable Capybara

единство жестко замораживает все

//For 3D Games, 2D is similar but uses Rigidbody2D, RigidbodyConstraints2D
public GameObject obj; // this is the actual game obj. Drag & drop in inspector
// or if this script is on the object, then get the transform.gameObject.
private Rigidbody rb; // this will reference the physics

void Start()
{
  	rb = obj.GetComponent<Rigidbody>(); // grabs the rigidbody
  	rb.constraints = RigidbodyConstraints.FreezeAll; // freeze rotation and pos
  	// This will freeze as script is loaded. You will have to use
  	// RigidyBodyConstraints.None to free physics.
{
Joshua Patterson

Unity жестко замораживает все вращение

rigidbody.constraints = RigidbodyConstraints.FreezeRotation;
mehmet köksal

Ответы похожие на “единство жестко замораживает все”

Вопросы похожие на “единство жестко замораживает все”

Больше похожих ответов на “единство жестко замораживает все” по C#

Смотреть популярные ответы по языку

Смотреть другие языки программирования