Answers for "unity how to freeze position"

C#
2

freeze position unity c#

rigidbody.constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationZ | RigidbodyConstraints.FreezePositionY | RigidbodyConstraints.FreezePositionZ;
Posted by: Guest on July-01-2020
0

unity freeze position in script

using UnityEngine;

public class FreezePosition : MonoBehaviour
{
    public GameObject TheThingToFreeze;
  	
    public void	Start()
    {
    	TheThingToFreeze.GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezePositionX | RigidbodyConstraints.FreezePositionY | RigidbodyConstraints.FreezePositionZ;  
    }
      
}
Posted by: Guest on February-26-2021
0

how to freeze an object's position unity

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

Code answers related to "unity how to freeze position"

C# Answers by Framework

Browse Popular Code Answers by Language