hi, how can we create "3D" markers such as this plugin : https://www.youtube.com/watch?v=EYBMNcdGwT4
Because you have : GenericMapMarker but it's only in "2D" and in the video it's in "3D"
Rust | 3D Markers
I'd assume that's implemented as a GUI, it'll be getting your position and view angle very frequently, and doing a bunch of vector mathematics to work out if and where on your screen it should put that text to create the illusion of being in the 3d game space.
yeah i think too but how can we get "Camera" ? because in unity we can do "WorldToScreen" but we need camera for that to "multiply matrices".
There's this in BasePlayer which I've used for putting something infront of the face:
player.serverInput.current.aimAnglesIt's not that simple though because players can have variable FOV. Perhaps you can assume the default and have users calibrate their FOV with a command if there's no better way to get it from the server.
oh yeah it's not simple i will try to see what can i do.
It's actually just a console command sent to the player "ddraw.text".
The player will need to have the admin flag to be able to see it though, this can be handled by giving the player the admin flag, sending the command and then removing the flag again.
oh ok this is awesome but what is the admin flag ? the "moderatorid" command or "ownerid" command ?
And how can we send command with "plugin" ?
Ramirezdu06oh ok this is awesome but what is the admin flag ? the "moderatorid" command or "ownerid" command ?
And how can we send command with "plugin" ?
Flag is BasePlayer.PlayerFlags.IsAdmin, ownerid adds player to the owners group, and this flag is set upon connecting to the server.
Command can be sent with BasePlayer.SendConsoleCommand
Wow that's nifty!
There are a few examples in existing plugins. For example:Ramirezdu06oh ok this is awesome but what is the admin flag ? the "moderatorid" command or "ownerid" command ?
And how can we send command with "plugin" ?
so i have tried the command "ddraw.text" but how can i know the number of arguments ? because the "Main Game" can't be decompiled with "dnspy" so how can we get all args ?