AddLightSceneNode pb

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
Aienur

AddLightSceneNode pb

Post by Aienur »

Hi there,

firstly sorry for my bad english :s

I m trying to add a light scene node and animate it

All work perfectly, but i couldn't detach my lightscenenode from my camera node start :s

here the code i use :

//reposition de la camera car map non positionné en 0,0,0
if (node != null)
node.Position = (new Vector3D(-1300, -144, -1249));

//on rajoute une cam pour se promener :p
device.SceneManager.AddCameraSceneNodeFPS();

//on rajoute une lumiére rouge
ISceneNode light = null;

light = smgr.AddLightSceneNode(null,new Vector3D(),new Colorf(1.0f, 0.6f, 0.7f, 1.0f),600.0f,0);
ISceneNodeAnimator anim = smgr.CreateFlyCircleAnimator(new Vector3D(),25.0f,0.0005f);
light.AddAnimator(anim);

//lumiere de la particule

light = smgr.AddBillboardSceneNode(light, new Dimension2Df(50, 50),new Vector3D(),0);
light.SetMaterialFlag(MaterialFlag.LIGHTING, false);
light.SetMaterialType(MaterialType.TRANSPARENT_ADD_COLOR);
light.SetMaterialTexture(0,driver.GetTexture(path+"particlered.bmp"));
if someone could help me thank for all ;)
Nezumi
Posts: 15
Joined: Fri Sep 30, 2005 9:42 pm

Post by Nezumi »

je comprend pas exactement ton problème, un post en français pour le définir pour m'aider à t'aider :p
Petit français
Nezumi
Posts: 15
Joined: Fri Sep 30, 2005 9:42 pm

Post by Nezumi »

je comprend pas exactement ton problème, un post en français pour le définir pour m'aider à t'aider :p
Petit français
Aienur

Post by Aienur »

en fait je position la cam en (-1300, -144, -1249), le soucis ici c que qd je declare une light avc AddLightSceneNode, que je mette un vecteur ou pas, il me possitionne toujours la light au point de depart de la cam
HantaCore
Posts: 21
Joined: Wed Mar 22, 2006 4:38 pm

Post by HantaCore »

et tu veux que ta lumiere fasse quoi?

si tu veux qu'elle suive ta caméra, il faut la déclarer en Child node de ta cam. sinon elle est effectivement statique
Currently working on a C# MMORPG using Irrlicht.NET
noone88

Post by noone88 »

das ist nicht sinn des forums, wenn jeder in seiner landessprache spricht :lol:
Aienur

Post by Aienur »

from noone88
das ist nicht sinn des forums, wenn jeder in seiner landessprache spricht
you totaly right there no sense to speak into our native language into this forum.

By the way i will make a resume of what we said ..

The problem here, my light scene nod is static as HantaCore said.

--- Reply to HantaCore

I wich to place the light scene node in an other place that the camere scene node inital.

I have try to change the position, but nothing to do, this light scene node start again at the camera scene node :s
Aienur

Post by Aienur »

yep i resolve my stupid problem lol

as you can see in my fist post
ISceneNodeAnimator anim = smgr.CreateFlyCircleAnimator(new Vector3D(),25.0f,0.0005f);
the vector3D is set to default ... and it s totaly normal that my light point start at the same point of my camera point ;)

I just pust the good coordinate of the light point .... and it's work perfectly

there the good one
ISceneNodeAnimator anim = smgr.CreateFlyCircleAnimator(new Vector3D(400,19,102),25.0f,0.0005f);
i would thanks all for you help ;) ... see soon ( going to register huhu )
HantaCore
Posts: 21
Joined: Wed Mar 22, 2006 4:38 pm

Post by HantaCore »

das ist nicht sinn des forums, wenn jeder in seiner landessprache spricht
Was? verstehst-du kein französich? :p

ok ich werde probieren ab jetzt in englisch zu schreiben...
Currently working on a C# MMORPG using Irrlicht.NET
Yeurl
Posts: 31
Joined: Thu Apr 13, 2006 9:34 am

Post by Yeurl »

yep, selbst wenn Englisch es nicht das Fest ist alle Tage lol ;)
Locked