Horje
interpolate rotation unity3d Code Example
interpolate rotation unity3d
//using the cross-product is quite effective 
//Note: This is quite usefull for rigidbodys... 
//but you can also use that for transform with some code adjustments
Vector3 targetDir;
Vector3 currentDir = transform.forward; //whatever your currentDir is

//the cross product returns the axis you want to rotate around
Vector3 crossProduct = Vector3.cross(targetDir, currentDir);
float magnitude = crossProduct.magnitude;
rigidbody.angularVelocity = crossProduct.normalized * speed * magnitude;




Csharp

Related
c#  square every digit of a number Code Example c# square every digit of a number Code Example
c# convert to nullable datetime Code Example c# convert to nullable datetime Code Example
c# type of string Code Example c# type of string Code Example
unity making homing missile Code Example unity making homing missile Code Example
linq select max value from list Code Example linq select max value from list Code Example

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