NPC Rotation Problem

I’ve been doing an NPC system for my game, until i got to the rotation problem. So, NPCs will behave very strangely when i’m forcing them to look at player with an AlignOrientation or IKControl. Even if i make the look only X and Z axis and not at Y axis, they start to behave… strange: they start flying, jittering or going away from player.

How can i make them work properly?

(In this example i also want this sphere to look also at Y)

2 Likes

Is it supposed to walk toward the player and face the player? or walk away from the player and face the player?

Either way, try multiplying the overall CFrame/LookVector (or whatever makes it go or look in a direction) by -1

1 Like

It’s supposed to always face the player if possible, no matter the direction of movement.

Yeah, also, those npc’s which i want to turn only at X and Z axis looks something like this

2 Likes