Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
By the way you are asking, then I'm assuming Lua isn't your strong front and you haven't looked through the github, or not familiar with how a virtual camera works etc. so it's fair to be uncertain.
So I assume it wouldn't be straight forward for you, but at least look though the code and readme on the github and judge for yourself. You would just need to understand the Input/Output for the cameraTransform.lua and understand the Render.lua file to project 3d points to the screen.
There's an in game example and template folders to differentiate the core functions.
If you convert the radar target to a global/world 3d point (x,y,z), then the code is mostly forward with how to map a point to the screen.
I used a personal Lua library, which doesn't make it quite forward with plug and play of the functions, which is a little bad on my part, as you would need to look though that library for whatever is needed, or know the SW VSCode extension for using custom libraries.
This is also using matrices to optimize for thousands of points, which takes more space than if you would have just done some vector calculations, which I've seen others that done so, some time ago. I don't have that implementation at hand, but that would've been a lot easier for plug and play to project 3d points to the hud.
There is a section for head_position_offset (approximation), also variable/vector for the relative position at the seat headrest block to the player head (When holdning nothing in hand).
That local position vector (head_position_offset) only depends on the seat look direction (and gender of player, defaults to male).
Picture of local coordinate space origin at seat headrest block:
https://github.com/Jumper-44/Stormworks_AR-3D-Render/blob/master/Pictures/Local%20Coordinate%20Space.png
I think it would help a lot of technical players including myself.
I've updated the github repo cameraTransform.lua and README.md