Jump to content

Skrakle

Members
  • Posts

    79
  • Joined

  • Last visited

Recent Profile Visitors

4,133 profile views

Skrakle's Achievements

Newbie

Newbie (1/14)

20

Reputation

  1. In my example, model is an Entity. Here's a brief example. // Declared in App.h // Entity* model = NULL; Vec3 model_rotation; // Loaded at start // model = Model::Load("Models/model_name.mdl"); model->SetCharacterControllerAngle(180); model_rotation = Vec3(0, 0, 0); // In your loop // float rot_speed = 0; if (window->KeyDown(Key::Left)) { rot_speed = -1.5; } else if (window->KeyDown(Key::Right)) { rot_speed = 1.5; } if (window->KeyHit(Key::Escape)) { model->Release(); return false; } model_rotation.y += rot_speed * Time::GetSpeed(); model->SetInput(model_rotation.y + model->GetCharacterControllerAngle(), 0, 0, 0, false, 1, 0); If you're still having issues, send me the model and i'll test it.
  2. Sorry, i forgot to tell you that you also need to add model->GetCharacterControllerAngle() where you set the angle with SetInput. This is how i'm doing it since i have a lot of models that are +180 as well. Example: model->SetInput(model_rotation.y + model->GetCharacterControllerAngle(), move_speed, 0, 0, false, 1, 0);
  3. Have you tried playing with lighting quality? I had issues with shadows too and i ended up setting the lighting to High to resolve it. In the editor: Options > Video > Lighting Quality (High) and don't forget to set it when game starts as well: world:SetLightQuality(2)
  4. I had this problem before, if i remember correctly, this should fix it: self.entity:SetCharacterControllerAngle(180); (or c++) model->SetCharacterControllerAngle(180);
  5. It's one of the main reasons why i went from lua to c++ given the complexity of my game. I have so many classes and structs that for me, it would have been a nightmare to do all this in lua. As for speed penalties, i don't know, i never did any benchmark tests but i'm guessing that there might be.
  6. The error only occurs if included in a LE project. In an empty console c++ application, there are no errors and works as intended.
  7. I managed to rewrite my controller classes for native support (eliminating the need for the SDL lib) for both Linux and Windows but when i include dinput.h in a LE project, the compiler is giving errors, probably because it's conflicting somewhere somehow and i haven't been able to figure out how to fix it. 1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\include\dinput.h(4318): error C2143: syntax error : missing ';' before '__stdcall' 1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\include\dinput.h(4318): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  8. Yeah i know 20000 pivots seems extreme as a test, that was merely to demonstrate the consumption factor. Even if it's insignificant, it still good practice, especially if one day, the engine ever goes to console.
  9. I had the same problem at first and it was because i didn't build a navmesh for the map. If you haven't already, go to TOOLS -> Build Navmesh. If you modify the map after that, you'll need to rebuild it again.
  10. Yeah i was afraid that might happen in lua or even in linux, i guess it's unsafe to use.
  11. I just managed to make it work by releasing the window & context and re-creating them. I haven't tested it thoroughly, just wrote the code and it worked. Obviously you should replace the windows code for getting the desktop resolution with something else. In your loop: if (window->KeyHit(Key::F)) { window->Release(); context->Release(); if (fullscreen == false) { RECT desktop; const HWND hDesktop = GetDesktopWindow(); GetWindowRect(hDesktop, &desktop); window = Leadwerks::Window::Create("Lands of nowhere", 0, 0, desktop.right, desktop.bottom, Window::FullScreen); } else { window = Leadwerks::Window::Create("Lands of nowhere", 70, 70, 1024, 768); } context = Context::Create(window); fullscreen = !fullscreen; return true; }
  12. If you read my previous post again, you'll notice that i'm not only talking about speed optimization but memory as well which is my point. As for the pivot being an empty object, that is completely wrong, once initialized, there are objects in it are automatically initialized as well whether you're using them or not and will use extra (and unnecessary) memory... You should do some testing before making assumptions like that. It's like i said, there are people (such as you obviously) that need to see such things visually to be more productive, i don't. Edit: - I initialized 20000 Vec3s and it took about 1mb of memory - I initialized 20000 Pivots (without using or modifying them, just a simple Pivot::Create) and it took about 88mb. I rest my case.
  13. All this time i thought the problem was with my model. I wonder if we can simply use/implement a AABB for characters and use pick.
  14. I just added one in my scene, i've set a high range (20) and it does not flicker on my desktop pc. I sent it to my friend who has a laptop with an Intel Integrated Graphics and it flickers so it's no doubt on the hardware side (or driver).
  15. I agree, it definitely would make it easier to setup while editing but that's a matter of preference, some people need to see things visually more than others. For me, it's a matter of memory and performance, the choice was Initializing a Pivot object with tons of properties and methods vs a single Vec3.
×
×
  • Create New...