I'm controlling the spine of the enemy with an SkeletonIK3D, so it can "look" at the player. However, it doesn't seem to be looking at the player properly and I don't know why. Whenever the player the goes at a high place, the enemy looks down. Whenever the player goes to a low place, the enemy lows high. I even tried to invert the tracking in code to solve the problem but, it didn't work; it just behaved the same way. Does anyone know the solution to this problem? I'll give video examples.
Here's a screenshot of the enemy in the viewport.
Also, here's the code:
chest_ik_target.look_at(Vector3(player.global_position.x,player.global_position.y,player.global_position.z))
Does anyone know the solution to this problem? It has been holding back for a long time and I've tried finding various solutions on my own.