Bonjour,
Merci de la réponse.
De mon côté, peu après mon post je m'étais orienté justement vers SLight (en créant avant tout une lumière grâce à ILightSceneNode.
Ensuite, j'ai utiliser SLight, et régler le champ de vision de ma camera ( camera->setFarValue(100000.0f)

.
Enfin, j'ai utiliser de l'ombre grâce à addShadowVolumeSceneNode() mais sans paramètres.
Voici le code qui fonctionne :
#include <iostream>
#include <irrlicht.h>
using namespace std;
/* Namespaces pour Irrlicht : */
using namespace irr;
using namespace video;
using namespace core;
using namespace scene;
int main(int argc, char** argv)
{
// On initialise le moteur
cout << "Choix de la resolution de l'ecran : " << endl;
cout << "a. 640*480 - 32 bits " << endl;
cout << "b. 1024*768 - 32 bits " << endl;
cout << "c. 1366*768 - 32 bits " << endl;
IrrlichtDevice* device;
char choix = 0;
cin >> choix;
if (choix == 'a')
device = createDevice(EDT_OPENGL,dimension2d<u32>(640, 480), 32, false, true, false);
else if (choix == 'b')
device = createDevice(EDT_OPENGL,dimension2d<u32>(1024, 768), 32, false, true, false);
else if (choix == 'c')
device = createDevice(EDT_OPENGL,dimension2d<u32>(1366, 768), 32, false, true, false);
else
exit(0);
// On récupère le gestionnaire de scene
ISceneManager* scenemgr = device->getSceneManager();
// On récupère le pilote video
IVideoDriver* driver = device->getVideoDriver();
// On met un titre pour notre fenetre
device->setWindowCaption(L"Premier projet Irrlicht");
SKeyMap keyMap[5]; // re-assigne les commandes
keyMap[0].Action = EKA_MOVE_FORWARD; // avancer
keyMap[0].KeyCode = KEY_KEY_Z; // z
keyMap[1].Action = EKA_MOVE_BACKWARD; // reculer
keyMap[1].KeyCode = KEY_KEY_S; // s
keyMap[2].Action = EKA_STRAFE_LEFT; // a gauche
keyMap[2].KeyCode = KEY_KEY_Q; // q
keyMap[3].Action = EKA_STRAFE_RIGHT; // a droite
keyMap[3].KeyCode = KEY_KEY_D; // d
keyMap[4].Action = EKA_JUMP_UP; // saut
keyMap[4].KeyCode = KEY_SPACE; // barre espace
// Camera et paramétrage :
ICameraSceneNode* camera = scenemgr->addCameraSceneNodeFPS( // ajout de la camera FPS
0, // pas de noeud parent
100.0f, // vitesse de rotation
0.01f, // vitesse de deplacement
-1, // pas de numero d'ID
keyMap, // on change la keymap
5); // avec une taille de 5
// Projection de la caméra et désactiver le curseur:
camera->setFarValue(100000.0f);
device->getCursorControl()->setVisible(false);
// On ajoute une map à la scene :
IAnimatedMesh *room = scenemgr->getMesh("media/MAP.obj");
IAnimatedMeshSceneNode *nRoom = scenemgr->addAnimatedMeshSceneNode(room);
scenemgr->getMeshManipulator()->makePlanarTextureMapping(room->getMesh(0), 1.0f);
nRoom->setScale(vector3df(2,2,2));
nRoom->setMaterialFlag(EMF_LIGHTING, true);
nRoom->setMaterialFlag(EMF_ANISOTROPIC_FILTER, true);
nRoom->setMaterialFlag(EMF_ANTI_ALIASING, true);
ILightSceneNode *lumiere = scenemgr->addLightSceneNode(0);
//ISceneNodeAnimator *anim = scenemgr->createFlyCircleAnimator(vector3df(500,500,500), 60, 0.0005);
//lumiere->addAnimator(anim);
ILightSceneNode *lumiere2 = scenemgr->addLightSceneNode(0);
//lumiere2->addAnimator(anim);
// Ajout d'une lumière diffuse n°1 :
//On crée une instance
//Un soleil lumiere
SLight light;
//On fait tous les réglages
light.Type = ELT_POINT;
light.Radius= 5000.0f;
light.AmbientColor = SColorf(1.0f,1.0f,1.0f,1);
light.SpecularColor= SColorf(0.4f,0.0f,0.0f,1);
light.DiffuseColor = SColorf(1.0f,1.0f,1.0f,1);
light.CastShadows = true;
lumiere->setPosition(vector3df(20,500,380));
lumiere->setLightData(light);
//lumiere2->setPosition(vector3df(-500,500,50));
lumiere2->setLightData(light);
nRoom->addShadowVolumeSceneNode();
scenemgr->setShadowColor(SColor(150,0,0,0));
// Ajout du Skydome :
ISceneNode *ciel = scenemgr->addSkyDomeSceneNode(driver->getTexture("media/Skydome/Skydome.jpg"));
// Position camera :
vector3df positionCam;
int lastFPS = -1;
// On lance la boucle de rendu
while(device->run())
{
driver->beginScene(true, true, SColor(255,128,128,255));
scenemgr->drawAll();
driver->endScene();
int fps = driver->getFPS();
if (lastFPS != fps)
{
core::stringw str = L"Projet Irrlicht - Phase de tests [";
str += driver->getName();
str += "] FPS:";
str += fps;
device->setWindowCaption(str.c_str());
lastFPS = fps;
}
}
device->drop();
return 0;
}
Encore merci de ton aide, mais je te rassure je reviendrai prochainement lol ! Bonne soirée