Perspective API 演示
本模组基于 Perspective API 实现了几个简单的自定义视角。如果你正在开发涉及自定义视角功能的模组,可以参考本模组的代码。本模组并非用于实际游戏,因此功能并不完善——例如,在自由相机模式下,你仍然可以使用鼠标破坏/放置方块。这不被视为 bug。
特性
本模组添加了以下自定义视角:
简单第三人称
几乎与原版第三人称视角相同,只是调整了相机位置,使玩家位于屏幕的左下角。
自由第三人称
几乎与原版第三人称视角相同,但移动鼠标仅旋转相机,而不旋转玩家。玩家会自动转向移动方向。
此外,鼠标滚轮会同时调整相机与玩家的距离和视野(FOV),以玩家为中心,实现希区柯克变焦(推拉变焦)效果。
自由相机
相机从玩家实体分离,可以独立控制:
- 移动键控制相机的移动
- 空格 / 潜行 键分别将相机向上 / 向下移动
- 丢弃 / 物品栏 键旋转相机(围绕视图轴旋转)
所有移动均基于相机的局部参考系,而非世界参考系。
Perspective API Demo
This mod implements several simple custom perspectives based on the Perspective API. If you are developing a mod that involves custom perspective functionality, you may refer to the code in this mod. This mod is not intended for actual gameplay, so its features are not perfect—for example, in free camera mode, you can still break/place blocks with the mouse. This is not considered a bug.
Features
This mod adds the following custom perspectives:
Simple Third Person
Almost identical to vanilla third-person view, except that the camera position is adjusted so that the player is positioned in the lower-left portion of the screen.
Free Third Person
Almost identical to vanilla third-person view, but moving the mouse only rotates the camera, not the player. The player automatically turns toward the movement direction instead.
Additionally, the mouse scroll wheel adjusts both the camera-to-player distance and the FOV simultaneously, centered on the player, achieving a Hitchcock zoom (dolly zoom) effect.
Free Camera
The camera detaches from the player entity and can be controlled independently:
- Movement keys control camera movement
- Space / Sneak move the camera up / down
- Drop / Inventory keys roll the camera (rotate around the view axis)
All movements are based on the camera's local reference frame, not the world reference frame.
评论 0
登录后参与评分
还没有评论,来抢沙发吧