Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
FractalineHue opened this issue Dec 5, 2022 · 3 comments

Comments

@FractalineHue
Copy link

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

@SirEndii
Copy link
Member

SirEndii commented Dec 6, 2022

I doubt that I'll implement this feature into the current ar goggles system, since I want to rewrite this for 0.8
That just means, that it'll take some time ^^

@FractalineHue
Copy link
Author

Thanks! I can certainly wait on it would just be cool to have, and then I can do fun things.

@Peekofwar
Copy link

Peekofwar commented Jan 1, 2023

Here's a possible solution for handling multiple players: You could potentially return a numerically indexed table that is numerically ordered based on the order of paired glasses. So, the first pair would always be entry 1 in any returned table.
If the player is out of range or not present, it could just return values of 0 or something when fetching data.

Just a thought.

@SirEndii SirEndii transferred this issue from IntelligenceModding/AdvancedPeripherals Nov 9, 2023
@zyxkad zyxkad added the area-SmartGlasses SmartGlasses relative label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

4 participants