I am trying to lock onto a target and shoot while locked.
I have had some sucess with lookAt and using raycast but i can shoot the emeny and the ray works fine but i cant turn away as the lookAt is forcing me back to look at the enemy. i have the lookat on the gun a child of the player.
The only this i want to do extra is when i mouseDn on the object the target is locked on by isTargeting and only when i MouseDown elsewhere the is targeting stops.
So really i want to MouseDn on enemy which lock target on and if i Mouse down elsewhere targeting is off.