Closed justlunix closed 10 months ago
That is an old client bug... @juliarn should we fix this internally by sending a head rotation after the spawn?
Yeah we could do that
Still present in 1.8
I believe this issue is still present, how do we fix this with the 3.0 releases?
v3 uses a different approach to this problem by sending the information again when the player moves inside the imitation distance of a npc and the LOOK_AT_PLAYER flag is set (and, of course, the action controller is enabled). This check also includes rotation of the player and is not limited to moving into any direction. If you want the npc to instantly look at the player after spawning you can do that with your own spawn listener. @DasBabyPixel recently implemented such a change (or, at least, we were discussing about it) so maybe he can give some input on this topic as well.
Yes the change to sync the yaw and pitch on spawn has already been implemented. It just isn't in the beta5, so you have to depend on the latest commit instead of beta5.
implementation("com.github.juliarn.NPC-Lib:npc-lib-bukkit:8eb7fbe")
If you have the field NpcActionController.AUTO_SYNC_POSITION_ON_SPAWN
then everything should work
Gotcha, thanks!
beta6 was released with these changes, closing this as complete. Feel free to open a new issue if the issue is still there
When setting the yaw of an npc while creating it using
NPC.builder().location(loc)
, the yaw is not correct.Updating it via
npc.rotation.queueRotation(yaw, pitch)
works just fine.