rotation unity script 2d
C#
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;transform.Rotate(Vector3(0, 0, 50));
//instead of :
transform.eulerAngles = new Vector3 (0, 0, 50);
//or like you said
transform.eulerAngles = Vector3.forward * 50;
Also in C#:
- Title
- datagridview column color c#
- Category
- C#
- Title
- how to wait in c#
- Category
- C#
- Title
- blazor onchange event not firing with inputselect
- Category
- C#
- Title
- c# long to int
- Category
- C#
- Title
- hwo to make an array in C#
- Category
- C#
- Title
- json serialize object capitalization config
- Category
- C#
- Title
- microsoft input tool need .net framework
- Category
- C#
- Title
- c# create dynamic object
- Category
- C#
- Title
- leantween id
- Category
- C#
- Title
- nunit return parameter
- Category
- C#
- Title
- file picker uwp c#
- Category
- C#
- Title
- import regex c#
- Category
- C#
- Title
- blazor display validation message
- Category
- C#
- Title
- c# directories loop
- Category
- C#
- Title
- unity rigidbody constraints
- Category
- C#
- Title
- and unity
- Category
- C#
- Title
- how to join array indexes with comma in c#
- Category
- C#
- Title
- prefab gets character transform
- Category
- C#
- Title
- c# contextswitchdeadlock
- Category
- C#
- Title
- c# list to string
- Category
- C#
- Title
- C# how to get public key for InternalsVisibleTo
- Category
- C#
- Title
- c# string contains space
- Category
- C#
- Title
- unity collider2d contains point
- Category
- C#
- Title
- enums as numbers c#
- Category
- C#
- Title
- c# webrequest cookies
- Category
- C#
- Title
- order by C#
- Category
- C#
- Title
- unity 2d top down movement
- Category
- C#
- Title
- instantiate object in circle
- Category
- C#
- Title
- c# webcam
- Category
- C#
- Title
- unity gizmo draw line
- Category
- C#
- Title
- unity fps counter
- Category
- C#
- Title
- snake game
- Category
- C#
- Title
- in unity i want to destroy a gameobject when it hits the edge of the screen
- Category
- C#
- Title
- c# length of array
- Category
- C#
- Title
- Net.ServicePointManager.SecurityProtocol .net framework 4
- Category
- C#
- Title
- c# ^ operator
- Category
- C#
- Title
- c# loop through two dimensional array
- Category
- C#
- Title
- animator hash in unity
- Category
- C#
- Title
- how to make an object move in unity
- Category
- C#
- Title
- Assets\playermove.cs(30,37): error CS1003: Syntax error, ',' expected
- Category
- C#
- Title
- sqlite connection c#
- Category
- C#
- Title
- start a particle effect when a button is pushed
- Category
- C#
- Title
- c# relaxed boolean cast
- Category
- C#
- Title
- create object in c#
- Category
- C#
- Title
- how to convert a number to 2 decimal places in c#
- Category
- C#
- Title
- how to flip selection in aseprite
- Category
- C#
- Title
- add new page to site c# programmatically
- Category
- C#
- Title
- bool toggle unity c#
- Category
- C#
- Title
- viewBag as a list
- Category
- C#
- Title
- c# find duplicates in list
- Category
- C#
- Title
- external font family uwp c#
- Category
- C#
- Title
- C# foreach loop async but wait at end
- Category
- C#
- Title
- unity face direction of movement
- Category
- C#
- Title
- c# instantiate
- Category
- C#
- Title
- c# winform remove button border
- Category
- C#
- Title
- c# convert to nullable datetime
- Category
- C#
- Title
- How to look at an object unity
- Category
- C#
- Title
- array copy c#
- Category
- C#
- Title
- c# string remove special characters
- Category
- C#
- Title
- c# set textbox text
- Category
- C#
- Title
- decimals not stored in azure tables
- Category
- C#
- Title
- comments unity c#
- Category
- C#
- Title
- c# find element by condition
- Category
- C#
- Title
- jump script unity 2d
- Category
- C#
- Title
- c# .net core memory cache
- Category
- C#
- Title
- while loop check condition c#
- Category
- C#
- Title
- string to enum c#
- Category
- C#
- Title
- try catch c#
- Category
- C#
- Title
- Unity C# instantiate prefab
- Category
- C#
- Title
- initialize matrix c#
- Category
- C#
- Title
- random from list c#
- Category
- C#
- Title
- c# get directory part of path
- Category
- C#
- Title
- asp net mvc 5 return view from another controller
- Category
- C#
- Title
- unity ai wander script
- Category
- C#
- Title
- c# remove character from string at index
- Category
- C#
- Title
- c# ref
- Category
- C#
- Title
- c# creating exceptions
- Category
- C#
- Title
- string to uint c#
- Category
- C#
- Title
- c# System.Resources.MissingManifestResourceException error
- Category
- C#
- Title
- how to clear console through script unity
- Category
- C#
- Title
- set label position winforms
- Category
- C#
- Title
- visual studio C# hintergrund bild ändern
- Category
- C#
- Title
- unity rotate object relative to camera
- Category
- C#
- Title
- Execute code every x seconds with Update()
- Category
- C#
- Title
- c# catch two exceptions in one block
- Category
- C#
- Title
- first sentence letter capital in c#
- Category
- C#
- Title
- open file in explorer c#
- Category
- C#
- Title
- perlin noise unity
- Category
- C#
- Title
- c# filesystemwatcher double events
- Category
- C#
- Title
- unity input get axis
- Category
- C#
- Title
- how can convert string to int csharp
- Category
- C#
- Title
- mailkit send attachment
- Category
- C#
- Title
- c# mailmessage set sender name
- Category
- C#
- Title
- button color uwp c#
- Category
- C#
- Title
- open zip file in c#
- Category
- C#
- Title
- iterate through dictionary c#
- Category
- C#
- Title
- c# tostring mmm dd yyyy
- Category
- C#
- Title
- unity list length
- Category
- C#
- Title
- asp.net model display name
- Category
- C#
- Title
- how to cjeck if a string has a word c#
- Category
- C#