I'm developing (or rather butchering) plugin for Rust, which was build in Unity, and I need to create a targeting system. Unfortunately I got stuck on
WorldToViewportPoint. It seems that the
Camera.main is not what player sees and is not moving at all. Also it has different resolution from what the game is set up.
Unfortunately I can't use Unity and all the work needs to be done in VS.
Does anyone has a suggestion how to get a "proper" camera for this?
Thank you in advance
As requested this is my code:
The rest is just getting the
bAnimalNPC and doing some checks.