Hi , how can i parent rotation object to another object in evrytime ?
I don’t really understand what you mean. Can you explain your problem in any more detail? Perhaps give an example?
pardon me i have a poor mind and i cant speak good in english… well
i use LookAt() for rotate the enemy to my player… but i have some problem , how can i limmit LookAt() function in only one axis (y) ?
You just need to take the Y coordinate out of the point to look at. Do this by setting it to the same value as the rotating object:-
var lookTarget = target.transform.position;
lookTarget.y = transform.position.y;
transform.LookAt(lookTarget);