Closed plytki closed 1 year ago
Interesting, the method is used internally (in combination with the action controller) and works there perfectly fine from my testing 🤔
Maybe I'm doing it wrong. How can I properly rotate the npc and when should I?
I've tried everything.
I have the same issue
Line 128 is setting the position but still nothing.
The lookAt
method returns a prepared packet, you need to send it to the target player(s), using .schedule
This also does not work. "/ https://streamable.com/273clz
Can you print out the result of bossNPC.getPosition()
and walk to that position? That should be where the npc looks to...
Based on the printed values, it looks correct? (maybe I'm just misunderstanding the values tho 😂 )
Npcs are facing yaw 0. Not 90 as expected.
The yaw and pitch you're providing to the method are not taken into account. The method calculates the yaw and pitch to look at based on the position to look at (x, y, z).
Is there a way to change just rotation? I want to just change the rotation of the npc.
Might be a good helper method to add, until then you can use platform.packetFactory().createRotationPacket(yaw, pitch).schedule(...)
Ok, that works! Thanks!
Npc yaw setting is not working. It always spawns at yaw = 0. I used
npc.lookAt()
but still doesn't work. How to properly rotate an Npc?