What function is used to make GUI on entities just like the printer?
Most likely it is either using the surface library or some form of 3d2d
Ok thanks.
You could always look at how it's implemented in darkrp and the toolguns in sandbox
Do you want to interact with it or just display information?
Here is a vending machine i made with 3d2d
[video=youtube;M7BnmRslPCI]http://www.youtube.com/watch?v=M7BnmRslPCI&feature=youtu.be[/video]
share this pls :3 or how did you made this?
It is a 3d2d pane that is interacted with by tracing the player's eyes to the vending machine when they are within 200 units. The trace hit position is then localized to the 3d2d Cursor x,y position. Everything is a texture. I can't share this because I planned on monetizing it.
Okay, can make any simple of this?
That's really cool, but I dont have idea how to make it. Just need any easy example.
[QUOTE=Total Crash;42833347]Okay, can make any simple of this?
That's really cool, but I dont have idea how to make it. Just need any easy example.[/QUOTE]
Why do I have this feeling your next question would be "where do I put this?".
[QUOTE=aurum481;42833608]Why do I have this feeling your next question would be "where do I put this?".[/QUOTE]
Maybe because you're jackass?
[QUOTE=Total Crash;42833637]Maybe because you're jackass?[/QUOTE]
Brilliant, great way to get help.
[QUOTE=a-cookie;42833750]Brilliant, great way to get help.[/QUOTE]
Agreed, that's a lil bit weird, but this guy talking too much :X
[QUOTE=Total Crash;42833780]Agreed, that's a lil bit weird, but this guy talking too much :X[/QUOTE]
He made one post commenting on your posting style being similar to the "pls do this me huehuehue" guys we always see.
The simplest way I think you're going to get this is to either pay someone, hope someone is nice enough to tutor you, or learn how the write 3D2D stuff yourself bit by bit.
Trust me, once you get the basics of GMod Lua libraries down, they are really simple to use in proper things.
Spend some time on the GMod wiki. The old wiki has some tutorials which may be of more use, though a bit outdated.
[QUOTE=hexpunK;42833864]He made one post commenting on your posting style being similar to the "pls do this me huehuehue" guys we always see.
The simplest way I think you're going to get this is to either pay someone, hope someone is nice enough to tutor you, or learn how the write 3D2D stuff yourself bit by bit.
Trust me, once you get the basics of GMod Lua libraries down, they are really simple to use in proper things.
Spend some time on the GMod wiki. The old wiki has some tutorials which may be of more use, though a bit outdated.[/QUOTE]
Dude, am I asking about how to make 3d2d stuff? I really dont understand how to use cursor on 3d2d
[QUOTE=Total Crash;42833918]Dude, am I asking about how to make 3d2d stuff? I really dont understand how to use cursor on 3d2d[/QUOTE]
he just told you where to go
[QUOTE=Total Crash;42833918]Dude, am I asking about how to make 3d2d stuff? I really dont understand how to use cursor on 3d2d[/QUOTE]
Traces I believe. Last I checked you can't normally interact with 3d2d with the cursor, they aren't panels or whatever. And the cursor is never actually visible in that video.
Sorry for the confusion there. But still, you could easily find this out yourself with some experimentation.
[QUOTE=hexpunK;42833976]Traces I believe. Last I checked you can't normally interact with 3d2d with the cursor, they aren't panels or whatever. And the cursor is never actually visible in that video.
Sorry for the confusion there. But still, you could easily find this out yourself with some experimentation.[/QUOTE]
TraceLine... Thx dude.
The logic is fairly simple:
1. Define two vectors that are local rather than global. These should be the minimum and maximum bounds of your 3d2d region on the model. These should be Y/Z coordinates rather than X, Y and Z
A. Also store a Width and Height based on the difference between the vectors
2. Do an eye trace.
A. If the hit entity isn't this, don't continue
B. If the start is too far away from this, don't continue
C. If the normal is facing the wrong way ( player is not in front of it ), don't continue
3. Localize the hitpos ( Using Entity.WorldToLocal( hitpos ) )
A. Discard the depth so it is just Y/Z
4. If the hitpos is less than the minimum or greater than the maximum, don't continue
5. Subtract the minimum from the hitpos
6. X = hitpos.Y / Width
7. Y = hitpos.Z / Height
I might be wrong and it needs X rather than Y, but this should give you an idea of what you need to do.
There's probably some built in way to do this ( I think util.IntersectRayWithPlane might let you more or less skip step 2 ), or at least parts of it, but I am not aware of them.
[QUOTE=Kogitsune;42834180]The logic is fairly simple:
1. Define two vectors that are local rather than global. These should be the minimum and maximum bounds of your 3d2d region on the model. These should be Y/Z coordinates rather than X, Y and Z
A. Also store a Width and Height based on the difference between the vectors
2. Do an eye trace.
A. If the hit entity isn't this, don't continue
B. If the start is too far away from this, don't continue
C. If the normal is facing the wrong way ( player is not in front of it ), don't continue
3. Localize the hitpos ( Using Entity.WorldToLocal( hitpos ) )
A. Discard the depth so it is just Y/Z
4. If the hitpos is less than the minimum or greater than the maximum, don't continue
5. Subtract the minimum from the hitpos
6. X = hitpos.Y / Width
7. Y = hitpos.Z / Height
I might be wrong and it needs X rather than Y, but this should give you an idea of what you need to do.
There's probably some built in way to do this ( I think util.IntersectRayWithPlane might let you more or less skip step 2 ), or at least parts of it, but I am not aware of them.[/QUOTE]
Another good guy who want to help me :) thx u, but I was just need how to control entity. I just haven't think about trace :3
Sorry, you need to Log In to post a reply to this thread.