Hello, im trying to make an NPC follow the character around, as it is now if the player is closer than 3f to the npc it turns to face the player.
But when the player moves further than 3f away it starts moving in the player direction (this is good) but it doesnt rotate or stop when it gets close to the player again.
It’s probably a simple solution that im missing but its gnawing at me badly.
this is the code as is in the custom control for NPC:
You use the player position as the direction, which is not correct. The player position is only the direction when the NPC is at 0/0/0. You have to subtract the NPC position from the player position to get the correct direction from the current position of the NPC.