Skip to content

Screen width, height, and FOV function and Rotation(?) for the AR Goggles/Controller #26

@FractalineHue

Description

@FractalineHue

Describe your idea

Function(s) to get the width/height (getsize) in pixels of the players screen allowing a few things:

  • Centered display stuff on the AR Goggles such as cross hair display stuff
  • Centered display stuff on screen edges (Matching the hotbar, middle of sides, etc)
  • Paired with a getFOV and getRotation functions (These for some reason display in my game but always return 0) you could draw "blocks" that aren't really there (the visuals would be limited for certain) for intance an overlaid floor map could be drawn, this would of course require getting the players position which could be done many ways

Function to get the FOV of the player

  • Combined with a getSize and rotation and position this lets you compute positions in 3d space back to the player

Rotation get functions would also be helpful however it seems these may already be present as they show in my game on the AR controller peripheral, however they don't really work in anyway just returning 0 constantly and not throwing an argument error.

These functions could all either use a AR Goggle id (visible on the goggle), grab only the latest goggle assigned to the controller, or could use a player name and return nil if that player isn't wearing goggles bound to that block.

There are clear problems here like players with different FOVs and game display sizes all wearing goggles bound to one block. I also don't know if it's even possible. Still it would be very cool to have functions like this to draw centered to the screen and be able to draw stuff that appears in the world.

Describe alternatives you've considered if you've any

The only alternative I really have is players have to manually enter their FOV and game display size into the controlling computer somehow which while it works is very limiting.

Additional context

No response

Linked Issues

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions