edited May 2017 in ORK Support
Hi,
I'm aware that my request is very specific but I'm gonna ask anyway...

Could you please allow users to override the method(s) that ORK uses for camera.WorldToScreenPoint and similar, or whatever is used for example to place individual HUDs on combatants? (and the opposite methods like, I guess, ScreenPointToRay?)

I try to explain my scenario...
Basically I use a custom 2-camera setup where the first one, the actual MainCamera, is rendered at half resolution (or less) in a RenderTexture and then upsampled at full resolution in the second one. The GUI canvas must be rendered in "Screen Space - Overlay" mode in order to preserve the details of the GUI itself, regardless of the aforementioned trick. That's why I can't simply change the overall resolution of the screen.

The problem is: in this situation, functions like Camera.main.WorldToScreenPoint need to be (slightly) corrected accordingly, because the coordinates they return are based on the halved resolution.
In ORK this means, for example, that an individual HUD gets rendered in the wrong place on the screen.

So if I could override the default method(s) that interact with camera-to-screen relationship, I could replace it/them with the ones I already use.

Before asking I did some research in the forum and the API without success but I started to implement the ORK framework in my project only recently, so please excuse me if I missed some functionality that already exists for the purpose...

Thanks in advance,
Paolo
Post edited by unfalco on
  • The only way to do that would be to change this in the gameplay source code (which is included in the full version of ORK).
    E.g. the placement of individual HUDs at the combatant's position is handled by the GUI layer of the used GUI box (ORKGUILayer.WorldToScreenPoint function).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Ok, great!
    I managed to do it in Visual Studio 2017 adding the needed DLL references as the instructions say.

    By the way, when I first opened the solution in Visual Studio, the default target framework was .NET 2.0. I had to go and set it to 3.5 in order to make it compile succesfully.

    image

    Probably for the majority of users that's an obvious thing to do but maybe it could be useful to add this information to the tutorial page?

    Thanks a lot!
    Paolo
  • edited May 2017
    When using visual studio, make sure to use the Unity tools for Visual Studio (should come with Unity) and using the Unity 3.5 .net Subset Base Class Libraries or the Unity 3.5 .net full Base Class Libraries .

    Edit: Updated the tutorial with that information :)
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.