Horje
unity how to get the side ways velocity of a object Code Example
unity how to get the side ways velocity of a object
Rigidbody rb = GetComponent<Rigidbody>();
Vector3 worldVelocity = rb.velocity;
Vector3 localVelocity = transform.InverseTransformVector(worldVelocity);
//This gives velocity in all directions sideways is on the x axis the thread gives more info




Csharp

Related
tostring tmpro unity Code Example tostring tmpro unity Code Example
prevent page refresh Code Example prevent page refresh Code Example
how to convert int to char in c# Code Example how to convert int to char in c# Code Example
how to create a file through c# script Code Example how to create a file through c# script Code Example
c# bytes to image Code Example c# bytes to image Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12