UNITY - Look At script: pointing an object towards another; part 2: Slerp

Опубликовано: 17 Октябрь 2025
на канале: Francesco Milanese | CG Tutorials
39
0

You can find many 3D models, which can be used in Blender or other softwares, on the Adobe Stock 3D website at the following link:
https://stock.adobe.com/search/3d-assets

FREE PDF text version:
https://francescomilanese.gumroad.com...

** Please notice that I am not a native English speaker, so this is also a way for me to practice and improve; then, if you have suggestions on syntax and pronunciation, please write them in the comments: I appreciate them! Anyway, all my videos have subtitles! **

Hello everyone!
This is the second of two tutorials on creating a "Look At" script in Unity 2022 to make an object point towards another one.

Specifically, in the first part we analyzed the problem and implemented a solution that involved an instant rotation of the object; in this tutorial, however, we will create a slower and more gradual rotation, using Quaternions and Slerp.

In this tutorial, I will assume you are familiar with concepts such as Time.deltaTime and the Quaternion.Slerp method, as I have covered them in other tutorials; if you are not familiar with these topics, I recommend checking out those tutorials first.