Draw something with lua

how would you go about drawing a plane in lua with no models that can be resized and made solid?

What. That’s impossible. Not ONE piece, You could use it to create multiple models and sort them with angles , positions to make your plane then have it welded. But you can’t draw it through Lua. Impossible. Never will be possible.

In theory, if you were willing to spend a shitload of time, you could use surface.DrawPoly and cam.Start3D2D to draw a three dimensional plane, or you could just draw a picture of a plane (a lot easier).

Do you mean a plane as in the flying variety or a plane as an infinite surface?

Second one is, although not infinite, mostly doable.

Use the new mesh functions.

I thought he meant to CREATE a model and be able to use it else were with .mdl

well i was talking about a 2d plane as in a flat panel with only x and y and no depth not a plane as in a airplane what i am trying to make is a forcefield like object

With the rcent update came the ability to create 3d meshes in realtime with perfect collision geometry from within Lua. You’ll need to research about the mesh functions and how to use and build them.


I’m sorry, I had to rate you dumb for both possible reasons. One, if you were talkng about a plane as in the flying kind, you could make a single object out of many objects by using Source’s parenting abilities. If you were talking about the 2d plane kind, you are also wrong because of the new mesh functions.

Either way, you said both were impossible and I was able to prove possible within one post. Therefore, please research or at least learn more about Lua and Source before making huge claims like that.

You must realize that when you post something and someone searches it to find the wrong answer, you’ve created a problem.