3D to 3D2D | Touchscreen?

So i again i’m here asking for help xD, so this time is with math so i’ve been trying to make the 2D3D Textscreens able to be used with the USE key, by getting where you aim, making it into 2D, calculating where you are aiming on the 3D2D TScreen and then execute functions based on that. The Problem is, i’ve tried many ways and theres always some bugs or it just won’t work. I don’t want you to code for me(only if you want to) i want be guided to get there, so like, you get this and that and then you do that. But as always any help is much apreciated. Sorry for bad english again.

This should help you out.

you could use basic vgui.
HandsomeMatt got an good, easy to use lib for it.

Thanks for the help i’ll take a look at that then i’ll post the results in here

[editline]20th February 2015[/editline]

So how exactly do you use IntersectRayWithPlane, it needs 4 vectors that i have no idea what would they be
and i execute the API server side or client side?

rayOrigin is the origin of the ray to be cast (Your player’s AimPos)
rayDirection is the direction the ray is heading (Your player’s AimVector)
planePosition is the center position of your screen in world coordinates
planeNormal is the normal vector of the screen, basically where it’s facing

But as Tomelyr said it will be easier to just use HandsomeMatt’s 3d vgui library.

Ok i will try both, thanks for the help once more

If you want to use geometrical shapes instead of VGUI components, you could use my library.

Oh thanks i’ll have a look at that but the problem right now is that the rendering with the 3d2d vgui is being soo buggy, if i could avoid using then and do it the IntersectRayWithPlane or a different way would be so much better

My library doesn’t use VGUIs at all. You don’t need to even touch IntersectRayWithPlane; the library handles translating world coordinates to local coordinates.

So how to use it? D:

Nvm found readme

[editline]20th February 2015[/editline]

oh you API is good, thanks man! that is so cool