Use camera rotation

This commit is contained in:
DBotThePony 2022-10-01 10:33:51 +07:00
parent d5ef670ec7
commit 94b4e7da47
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -130,8 +130,8 @@ class EnderTeleporterFeature(capability: MatteryPlayerCapability) : AndroidActiv
//event.poseStack.translate(x, y, z) //event.poseStack.translate(x, y, z)
event.poseStack.translate(x - vx, y - vy, z - vz) event.poseStack.translate(x - vx, y - vy, z - vz)
event.poseStack.mulPose(Vector3f.YP.rotationDegrees(-ply.yRot)) event.poseStack.mulPose(Vector3f.YP.rotationDegrees(-event.camera.yRot))
event.poseStack.mulPose(Vector3f.XP.rotationDegrees(ply.xRot)) event.poseStack.mulPose(Vector3f.XP.rotationDegrees(event.camera.xRot))
val size = 1f + sin((System.nanoTime() / 1_000_000) / 250.0).toFloat() * 0.2f val size = 1f + sin((System.nanoTime() / 1_000_000) / 250.0).toFloat() * 0.2f
val half = size / -2f val half = size / -2f