What do you want to save?
Add Code snippet
New code examples
-
C# 2021-10-25 05:38:20
unity how to rotate something to point to something else
Vector3 dir = target.position - transform.position; Quaternion lookRotation = Quaternion.LookRotation(dir); Vector3 rotation = Quaternion.Lerp(partToRotate.rotation, lookRotation, Time.deltaTime * turnSpeed).eulerAngles; partToRotate.rotation = Quaternion... Add solution -
C# 2021-10-16 22:09:05
unity how to make a gameobject slowly look at a position
Quaternion lookAtSlowly(Transform t , Vector3 target , float speed){ //(t) is the gameobject transform //(target) is the location that (t) is going to look at //speed is the quickness of the rotation Vector3 relativePos = target - t.positio... Add solution