Invisible Entity Model

Trying to spawn in props via a custom entity. Some spawn normally, while others spawn and have physics, but have no material (invisible, not pink & black). The content is in a folder in my addons for the server, as well as the client, AND the models and materials are in the gamemode content folder as well. The model spawns just fine in sandbox, so I don’t believe it is my client.

item_drop init.lua:



function ENT:Initialize()
	self:PhysicsInit(SOLID_VPHYSICS)
	self:SetMoveType(MOVETYPE_VPHYSICS)
	self:SetSolid(SOLID_VPHYSICS)
	self:SetUseType(SIMPLE_USE)
	self.ID = nil
	
	local phys = self:GetPhysicsObject()
	
	if phys:IsValid() then
		phys:Wake()
	end
end


Yes, cl_init.lua has self:DrawModel() in it.

And when the item is to be spawned:



local ent = ents.Create("item_drop")
ent:SetModel(ITEM_DATABASE[ID].Model)
ent:SetNetworkedInt("id", ID)
ent:SetPos(Position)
ent:Spawn()


Maybe this is not a Lua error at all, but I don’t know for sure.

[editline]25th July 2017[/editline]

Solved: for some reason, I had to put the models and materials in the root folder, which is a little odd, but whatever works, works.