Why the transform is not looking at the target?

The goal is to make smooth rotating look at.

The parent object is my character have a Rigidbody.

The script is attached to the character parent. I make a reference to the character child name head.

I have a cube as the target the cube is rotating around the character with random height.

The character is never looking at the cube. I tried to change from LateUpdate to Update I tried to add a child of the head empty gameobject and reference the empty gameobject but still the character head is not rotating to the target.

using System.Collections; using System.Collections.Generic; using UnityEngine;  public class SmoothLookAt : MonoBehaviour {     public Transform leadObj;     public Transform lookAtTarget;     public float damping = 6;     public bool smooth = true;       private void LateUpdate()     {         if (lookAtTarget)         {             if (smooth)             {                 // Look at and dampen the rotation                 var rotation = Quaternion.LookRotation(lookAtTarget.position - leadObj.position);                 leadObj.rotation = Quaternion.Slerp(leadObj.rotation, rotation, Time.deltaTime * damping);             }             else             {                 // Just lookat                 leadObj.LookAt(lookAtTarget);             }         }     }      private void Start()     {         // Make the rigid body not change rotation         if (leadObj.GetComponent<Rigidbody>() != null)             leadObj.GetComponent<Rigidbody>().freezeRotation = true;     } } 

It seems to be working if I reference the head directly as leadObj and inside LateUpdate the problem is that I have to set the damping value to 260.

Why I need to set the damping value to be so high ?

And how can I make that the head will rotate to the target with automatic speed depending on the target moving speed ? So if I don’t set any damping value for example 0 or null it will automatic calculate the needing speed to rotate facing the target ?

I see now another problem. If I set the damping value to 100 for example the character head is stuttering the head will look at the target but will stuttering. I want that if the damping value is 100 or lower than rotate the leadObj with a delay facing the target. Something like when a turret is rotating facing a missile and if the missile is moving too fast the turret is rotating with some delay because he rotate slower. How can I do it ?

This is working using Lerp. But why if I set for example the duration value to 0 it’s not affecting the speed of the leadObj rotation ?

The leadObj keep rotating same speed facing the target even if the duration is 0.

What am I missing ?

using System.Collections; using System.Collections.Generic; using UnityEngine;  public class SmoothLookAt : MonoBehaviour {     public Transform leadObj;     public Transform lookAtTarget;     public float duration;     public bool smooth = true;      private float t = 0.0f;      private void Start()     {         // Make the rigid body not change rotation         if (leadObj.GetComponent<Rigidbody>() != null)             leadObj.GetComponent<Rigidbody>().freezeRotation = true;     }      private void LateUpdate()     {         if (lookAtTarget)         {             if (smooth)             {                 t += Time.deltaTime;                 float s = t / duration;                  // Look at and dampen the rotation                 var rotation = Quaternion.LookRotation(lookAtTarget.position - leadObj.position);                 leadObj.rotation = Quaternion.Lerp(leadObj.rotation, rotation, s);             }             else             {                 // Just lookat                 leadObj.LookAt(lookAtTarget);             }         }     }  } 

Looking to build a game that uses names of Premier League teams – what are the steps required to stay compliant

I am looking to build a game that users would play weekly. In order for the game to make sense, I would have to display the names of the 20 Premier League teams playing on a weekly basis. I will not be using the names of players themselves. The game would require people to pay to contend for their share of a weekly pot of winnings.

The game would be similar to: https://fantasy.espn.com/games/english-premier-league-pickem-2020/make-picks

How to render ultra-realistic looking models and textures in Blender? [closed]

I know I know, I sculpt a model, bake the textures >apply them and that’s it.

Come on, that can not be everything when it comes to ultra-realistic 3d models.

I have seen guys creating textures with applying 102381028310 stuff, like sub-surface scattering, then some extra layers of textures, once zoomed in, a user can see more textres that are like small and normally not rendered from far away.

Can you just make a list of such things that would not be included in the >bake them, difuse, AO, spec normal maps> apply them and that’s it.

So any extra technique that you know, please post it. Yes I know lightning is important but that is a whole different question. haha I probably sound a little bit irritated in this question, that is because I already asked in like 5 forums and no one is able to tell me some of the other techniques or whatever, so that I know where to expand my knowledge.