Dreikblack Posted December 22, 2023 Share Posted December 22, 2023 Looks like a component of new entity that was created by entity->Instantiate() has a pointer to original entity. Several months it worked fine. Maybe something went wrong when public entity pointer was replaced by GetEntity() method. Steam beta branch. #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1200, 800, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a world auto world = CreateWorld(); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); camera->SetPosition(0, 0, -3); //Create a light auto light = CreateBoxLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); //Create a box auto box = CreateBox(world); box->SetPosition(1, 1, 1); auto component = box->AddComponent<Mover>(); component->rotationspeed.y = 45; auto newBox = box->Instantiate(world, true, true); newBox->SetPosition(2, 2, 2); auto componentTest = newBox->GetComponent<Mover>(); Print("first box pos x:"); Print(box->GetPosition().x); Print(component->GetEntity()->GetPosition().x); Print("second box pos x:"); Print(newBox->GetPosition().x); Print(componentTest->GetEntity()->GetPosition().x); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer, false); } return 0; } 1 Quote Link to comment Share on other sites More sharing options...
Solution Josh Posted December 22, 2023 Solution Share Posted December 22, 2023 Thanks, that was an easy fix. I'll have an update up later today. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted December 23, 2023 Share Posted December 23, 2023 I will upload an update tomorrow. It's a little bit late in the day and I'd rather do it when there are many hours left. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted December 24, 2023 Author Share Posted December 24, 2023 No fix in newest update Quote Link to comment Share on other sites More sharing options...
Josh Posted December 24, 2023 Share Posted December 24, 2023 I'm going to investigate this navmesh thing and see if it's an easy fix I can fit in before I update the lib... Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted December 24, 2023 Share Posted December 24, 2023 It's fixed on the standalone now. Verified with this example: #include "UltraEngine.h" #include "Components/Motion/Mover.hpp" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Create a world auto world = CreateWorld(); //Create a box auto box1 = CreateBox(world); auto component1 = box1->AddComponent<Mover>(); auto box2 = box1->Instantiate(world, true, true); auto component2 = box2->GetComponent<Mover>(); Assert(component1->GetEntity() != component2->GetEntity()); return 0; } Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted December 24, 2023 Author Share Posted December 24, 2023 Thanks! Will be update available in Steam today? Quote Link to comment Share on other sites More sharing options...
Josh Posted December 24, 2023 Share Posted December 24, 2023 I thought you were using the standalone? Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted December 24, 2023 Author Share Posted December 24, 2023 No, in my region Paypal and Visa cards does not work nowadays so Steam is the only way to buy Ultra and i did that. I bought few months of Ultra sub before with fan Quake league reward money that i requested to send to me as a gift at this web-site. 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted December 24, 2023 Share Posted December 24, 2023 okay, it's live on steam now, on the beta branch 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.