Search the Community
Showing results for tags 'cylinder'.
It would seem that when using code that materials are not being loaded for cylinders and cones: function App:Start() --Create a window self.window = Window:Create() self.context = Context:Create(self.window) self.world = World:Create() self.camera = Camera:Create() self.camera:SetRotation(35,0,0) self.camera:Move(0,0,-1.2) local light = DirectionalLight:Create() light:SetRotation(35,35,0) material = Material:Load("Materials/Developer/bluegrid.mat") box = Model:Box() box:SetMaterial(material) box:SetScale(0.1,0.1,0.1)
Created a script this morning to load a cylinder with an attached script, however the material does not seem to load for the cylinder, or a cone, shaped CSG. Spheres and boxes load without issue. Not really sure why the materials are not loading, but I am hoping someone could clear this up. function Script:Use(entity) local bottle = Model:Cylinder() local material = Material:Load("Materials/Developer/bluegrid.mat") bottle:SetMaterial(material) bottle:SetScale(0.15,0.65,0.15) bottle:SetPosition(-4.4,1.6,1.9) local shape = Shape:Cylinder() bottle:SetShape(shape) bottle:S