"freeze axis in script" Code Answer's

You're definitely familiar with the best coding language C# that developers use to develop their projects and they get all their queries like "freeze axis in script" answered properly. Developers are finding an appropriate answer about freeze axis in script related to the C# coding language. By visiting this online portal developers get answers concerning C# codes question like freeze axis in script. Enter your desired code related query in the search bar and get every piece of information about C# code related question on freeze axis in script. 

freeze axis in script

By Comfortable CapybaraComfortable Capybara on Jul 18, 2020
public Rigidbody2D rb;

void Start()
{
	//Freeze Rotation on X Axis
	rb.constraints = RigidbodyConstraints2D.FreezeRotationX;
    //Freeze Rotation on Y Axis
    rb.constraints = RigidbodyConstraints2D.FreezeRotationY;
    //Freeze Rotation on Z Axis
    rb.constraints = RigidbodyConstraints2D.FreezeRotationZ;

	//Freeze Position on X Axis
	rb.constraints = RigidbodyConstraints2D.FreezePositionX;
    //Freeze Position on Y Axis
	rb.constraints = RigidbodyConstraints2D.FreezePositionY;
    //Freeze Position on Z Axis
	rb.constraints = RigidbodyConstraints2D.FreezePositionZ;
  
    //Freeze All Axis (Rotation & Position)
    rb.constraints = RigidbodyConstraints2D.FreezeAll;
    //UnFreeze All Axis (Rotation & Position)
    rb.constraints = RigidbodyConstraints2D.None;
}

Add Comment

2

All those coders who are working on the C# based application and are stuck on freeze axis in script can get a collection of related answers to their query. Programmers need to enter their query on freeze axis in script related to C# code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about freeze axis in script for the programmers working on C# code while coding their module. Coders are also allowed to rectify already present answers of freeze axis in script while working on the C# language code. Developers can add up suggestions if they deem fit any other answer relating to "freeze axis in script". Visit this developer's friendly online web community, CodeProZone, and get your queries like freeze axis in script resolved professionally and stay updated to the latest C# updates. 

C# answers related to "freeze axis in script"

View All C# queries

C# queries related to "freeze axis in script"

freeze axis in script unity mouse scroll wheel axis c# get z axis of quaternion touch unity rotate on x axis x y and z axis in unity look rotation only on y axis in unity unity float from another script C# player movement script unity unity change tmp text from script unity set particle properties through script what function is called just before the a script is ended c# how do i limit the amount of prefabs in unity using c# script how to assign 2d physics material through script unity can't put tmpro in script how to make a follow script in unity unity set sprite image from script reference variable from another script "winforms" c# character control script unity How to make unity script editor open in visual studio not in Note pad can't add an editor script How to execute a script after the c# function executed how to access the dictionary from another script in unity unity public script isGrounded script for copy gravity script unity how to change text to bold through script unity google script get time premade movement script c# unity unfreeze position in script unity script wait unity die script unity move script if else how to reference a static variable from another script in unity google script get font color unity script template folder HOW TO SET TAG IN SCRIPT UNITY unity how to get a script that is in Editor folder bounce script unity enemy turret one direction ahooting script unity 2d unity first person controller script unity remove component in script unity movement script 3d get int from another script unity unity teleport script 3D unity character movement script

Browse Other Code Languages

CodeProZone