/**
* Gets the camera for a specific entity.
*
* @param entity The entity to get the camera for.
* @param partialTicks The partial ticks for the camera.
* @return The camera for the entity.
*/
public static Frustum getCamera (Entity entity, float partialTicks) {
final double cameraX = entity.prevPosX + (entity.posX - entity.prevPosX) * partialTicks;
final double cameraY = entity.prevPosY + (entity.posY - entity.prevPosY) * partialTicks;
final double cameraZ = entity.prevPosZ + (entity.posZ - entity.prevPosZ) * partialTicks;
final Frustum camera = new Frustum();
camera.setPosition(cameraX, cameraY, cameraZ);
return camera;
}
RenderUtils.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:Bookshelf
作者:
评论列表
文章目录