Hello,
I’m stumped on something that I think should be really easy. But for whatever reason I can’t figure it out. In my AI Script I need the AI to have the option to aim their barrel at target’s lower then they are. I was trying to use this line of code here.
public GameObject Barrel;
public GameObject Target;
Barrel.transform LookAt (Target);
And I’ve tried this
Barrel.transform.LookAt(new Vector3(Target.transform.position.x, Target.transform.position.y, Target.transform.position.z));
For whatever reason it’s creating errors. Does anyone know the proper way to create this line of code? Sorry I’m a bit of an idiot when it comes to transforms and rotations.