#setRotation to match player rotation
1 messages · Page 1 of 1 (latest)
getViewDirection and setRotation is Vector3, so you just have to exclude one axis you dont need
exclude as in setting it to 0
ahh, I forgot it's a vector 3. How would I do that, as I thought the ".x" after it would only take the x axis?
I just want them to face the same direction as the player, no need for up and down.
I have this, from https://darkgameryt.github.io/ScriptAPI-Docs/versions/1.21.0/classes/mojang_minecraft.Entity.html#setRotation
Documentation for ScriptAPI - v1.21.0
shows it only needs 2 axis?
yeah, so setting y to 0 would leave as is right? then matching x to the player view x I expected to work
gimme a sec
Thanks 🙂