how do I set the ilightscenenode attributes in VB.NET?

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
twong
Posts: 1
Joined: Mon Mar 12, 2007 5:49 am

how do I set the ilightscenenode attributes in VB.NET?

Post by twong »

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.
Riki
Posts: 30
Joined: Tue Feb 27, 2007 9:12 pm
Location: Croatia

Re: how do I set the ilightscenenode attributes in VB.NET?

Post by Riki »

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.
Hi Twong,

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
Locked