Currently, it is impossible for a passenger entity to automatically and perfectly inherit the head rotation (yaw and pitch from mouse movement) of its vehicle, specifically a player. While passengers correctly follow the vehicle's position and body yaw, they remain rotationally static relative to the vehicle's head.
The Current Workaround:
To solve this, server owners, datapack creators and plugin developers must resort to a constant, resource-intensive workaround:
-
Spawn a Display Entity and make it a passenger of the player.
-
Every tick, change the rotation of the display entity to the rotation of the player.
This method, while functional, has several critical flaws:
- Complex: it requires a lot of code/commands
- Laggy: does not perfectly sync with the vehicle (only syncs 20 times per second)
The Proposed Solution:
Introduce a new integer NBT tag for all Display Entities called vehicle_rotation_inheritance.
Ipropose four distinct states:
-
0: No Inheritance. This is the current default behavior. The display's rotation is completely independent.
-
1: Full Yaw & Pitch Inheritance. The display perfectly mirrors the vehicle's head yaw and pitch.
-
2: Yaw Inheritance Only. The display inherits the vehicle's head yaw (left/right rotation) but ignores its pitch (up/down rotation).
-
3: Pitch Inheritance Only. The display inherits the vehicle's head pitch but ignores its yaw.
Please sign in to leave a comment.
0 Comments