Crystal Space
Welcome, Guest. Please login or register.
October 20, 2017, 08:32:34 pm

Login with username, password and session length
Search:     Advanced search
9063 Posts in 2051 Topics by 77507 Members
Latest Member: Laidlebonnie483
* Home Help Search Login Register
  Show Posts
Pages: 1 [2]
16  Crystal Space Development / Support / Problem loading more than 1 level. on: July 09, 2008, 11:58:36 pm
In my 3d handler class i have thhe folowing code for loading a map

bool Owner3D::LoadMap (const char* mapname)

  vfs->ChDir (mapname);
  if (!loader->LoadMapFile ("world")) return false;
  engine->Prepare ();

  return true;

And this one for seting the camera.

bool Owner3D::StartCamera()
  iGraphics2D* g2d = g3d->GetDriver2D ();
  view1.AttachNew(new csView (engine, g3d));
  view1->SetRectangle (0, 0, g2d->GetWidth (), g2d->GetHeight ());

  csVector3 pos (0);
  if (engine->GetCameraPositions ()->GetCount () > 0)
    iCameraPosition* campos = engine->GetCameraPositions ()->Get (0);
    room = engine->GetSectors ()->FindByName (campos->GetSector ());
    pos = campos->GetPosition ();
    room = engine->GetSectors ()->FindByName ("room");
    pos = csVector3 (0, 0, 0);
  if (!room)
    return false;

  view1->GetCamera ()->SetSector (room);
  view1->GetCamera ()->GetTransform ().SetOrigin (pos);

The thing is that when i load the 1st map everithing goes smooth bu the instant i want to load a second level, it throws me an error.

any sugestions¿?


this is the order for calling the methods

17  Crystal Space Development / Support / Re: Question about camera in a CEGUI window on: July 06, 2008, 10:52:56 pm
thanks ill start looking into it
18  Crystal Space Development / Support / Re: Question about camera in a CEGUI window on: July 06, 2008, 05:29:03 pm
its not like im  asking you  to  handle me  the  code  im just  looking  for  some  orientation  and  how  to  solve  the  problem.  some tutorial  will be  helpfull or a crystal space class  that  i haven´t  learned about. lastly a answer"it can´t be  done  that  way" or "its to dificult" would   also be  a great help.
19  Crystal Space Development / Support / Question about camera in a CEGUI window on: July 05, 2008, 07:27:37 am

im a noob at crystal space 3d and have for a while been practicing with the tutorials and so on.

I now have a world map allready done and a CEGUI layout. And my question is if there is a way to atach a second camera to a small window created in the xml of the layout.

im creating a board game and would like to have a little 3d dice in a small window.
Pages: 1 [2]
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 3.344 seconds with 16 queries.