i tried doing this:
Torch.LightData.AmbientColor = New Colorf(0.5, 0.5, 0.5)
and get a compiler error saying that it's an expression value therefore it cannot be a target or something like that.
is there a correct way to do this?
i wasted all my free time trying to get this probem solved.
how do I set the ilightscenenode attributes in VB.NET?
Re: how do I set the ilightscenenode attributes in VB.NET?
Hi Twong,twong wrote:i tried doing this:
Torch.LightData.AmbientColor = New Colorf(0.5, 0.5, 0.5)
and get a compiler error saying that it's an expression value therefore it cannot be a target or something like that.
I already answered such questions ...but again:
Torch.LightData returns a Light structure thus the compiler creates a temp variable. When writting
Torch.LightData.AmbientColor = something
You are actually trying tochange the AmbientValue of the temp variable. No can do!
Use:
Light l = Torch.LightData;
l.WhatEver1 = newValue1;
l.WhatEver2 = newValue2;
Torch.LightData = l;
BTW I dont think you will be able to do this with the .NET wrapper.
Thats one of the reasons I ported to the CP wrapper.
Regards