SpiderPig Posted September 25, 2011 Posted September 25, 2011 Is SetColor() only supposed to work on meshes? I thought it would be able to work on entity's as well...? Quote
macklebee Posted September 25, 2011 Posted September 25, 2011 EntityColor() Sets the entity color. This affects meshes, emitters, lights, and coronas only. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel
SpiderPig Posted September 25, 2011 Author Posted September 25, 2011 That didn't work wither, I'm using lua too - probably should have gone to the other forum... object.model:SetColor(Vec4(1,1,0,1)) Quote
macklebee Posted September 25, 2011 Posted September 25, 2011 try this: local mesh = object.model:GetChild(1) mesh:SetColor(Vec4(1,1,0,1)) Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel
macklebee Posted September 26, 2011 Posted September 26, 2011 i lied... it does work for 'object.model' and models... you just need to use the recursive parameter.. i assume its due to the fact the mesh is the child of the model so the color is applied to it... object.model:SetColor(Vec4(1,1,0,1),1) Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.