Skip to content
BasaltSoftware
Bedrock 1.26.60

Site colour

Discord
Esc

    ↑↓ moveEnter openEsc close

    Keyboard shortcuts
    Ctrl K
    Search the whole site, from any page
    /
    Jump to the sidebar search, or search the whole site where there isn't one
    Enter
    Open the top search result
    Esc
    Clear the search, or close this panel
    ?
    Show these shortcuts

    A rotation: x is the pitch and y the yaw, in degrees.

    2 properties
    On this page

    Interface in @minecraft/server

    A rotation: x is the pitch and y the yaw, in degrees.

    import type { Vector2 } from '@minecraft/server';
    import { world, type Vector2 } from '@minecraft/server';
    for (const player of world.getAllPlayers()) {
    const vector2: Vector2 = player.getRotation();
    console.log(player.name, vector2.x);
    }
    import { world } from '@minecraft/server';
    for (const player of world.getAllPlayers()) {
    const vector2 = player.getRotation();
    console.log(player.name, vector2.x);
    }
    x: number;
    y: number;

    TeleportOptions.rotation, Entity.getRotation, Entity.setRotation, PlayerInputInfo.getMovementVector, Player.getRotation, InputInfo.getMovementVector, CameraFixedBoomOptions.viewOffset, CameraSetRotOptions.rotation, PlayerAimAssistSettings.viewAngle