Jump to content

Chimera

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by Chimera

  1. Josh added these in the 3.6 update, but there is currently no code for them as of yet. Attempting to use them will crash your application.

     

    Any idea when they might be fully implemented? I was actually about to try either making my own GUI system or using your template when I stumbled on them, but it would be so much easier if it was already in the engine.

  2. I am also getting an access violation when using the ->SetPosition/Fov commands in C++. Code in question(Posting the entire App::Start for completeness' sake) :

     

    bool App::Start()
    {
    //Perform cfg checks. Sets screenres to 1920x1080 if they throw an error
    try {
    ScreenWidth = stoi(System::GetProperty("Screen Width", "1920"));
    ScreenHeight = stoi(System::GetProperty("Screen Height", "1080"));
    } catch (std::invalid_argument) {std::cout << "\n\nWaiter!!! There was a string in my Screen Res!\n\n";}
    
    //Initialize Steamworks (optional)
    if (!Steamworks::Initialize())
    {
    System::Print("Error: Failed to initialize Steam.");
    return false;
    }
    //Create a window
    window = Leadwerks::Window::Create("Game Window",0,0,ScreenWidth,ScreenHeight,Window::Titlebar);
    
    //Create a context
    context = Context::Create(window);
    
    //Create a world
    world = World::Create();
    
    std::string mapname = System::GetProperty("map","Maps/G.map");
    Map::Load(mapname);
    
    //The culprits are right here----->
    //cam->SetPosition(0, 5, 0);
    //cam->SetFOV(90);
    
    
    //Move the mouse to the center of the screen
    window->SetMousePosition(context->GetWidth()/2,context->GetHeight()/2);
    window->HideMouse();
    return true;
    }
    

     

    I have tried debuging multiple times, and it always throws an access violation when those 2 lines are uncommented. It works perfectly fine if I just create a camera through the editor though, so I have no clue what is going on.

     

    EDIT: Apparently my problem was I forgot to call Camera::Create on cam....... I am an idiot. ಠ_ಠ

×
×
  • Create New...