ReudigerHugo Posted December 2, 2025 Report Posted December 2, 2025 In an effort to figure out if i can bring my external interactive map into the game ive been looking at ways to draw debug shapes, like eg lines, into the world simply to have a visual indicator for if my transforms are applied correctly. Looking at pictures like below i see its possible. Altough im just starting to mod this game and have been unable to find an api todo this in the game.
Solution Nat_VS Posted December 3, 2025 Solution Report Posted December 3, 2025 You certainly can do this. First, you'll want to create some lines. You can use the LineMeshUtil class to generate a 3D mesh for your lines. You can position and/or rotate the mesh if desired, but you need to upload it to the graphics card using 'capi.Render.UploadMesh(...)'. Then, you can render the mesh using the render API. You will want to use the 'EnumShaderProgram.Wireframe' shader, and you'll likely want to use one of the predefined render functions, e.g. 'OnRenderFrame'. For an actual example, see https://github.com/anegostudios/vsapi/blob/a2e2ca074c351d9154101107c704fd4d63161d51/Client/Render/WireframeCube.cs#L9. Hope this helps! 1
ReudigerHugo Posted December 3, 2025 Author Report Posted December 3, 2025 6 hours ago, Nat_VS said: You certainly can do this. First, you'll want to create some lines. You can use the LineMeshUtil class to generate a 3D mesh for your lines. You can position and/or rotate the mesh if desired, but you need to upload it to the graphics card using 'capi.Render.UploadMesh(...)'. Then, you can render the mesh using the render API. You will want to use the 'EnumShaderProgram.Wireframe' shader, and you'll likely want to use one of the predefined render functions, e.g. 'OnRenderFrame'. For an actual example, see https://github.com/anegostudios/vsapi/blob/a2e2ca074c351d9154101107c704fd4d63161d51/Client/Render/WireframeCube.cs#L9. Hope this helps! Yes that suffices! Thank you very much!
Recommended Posts