OneHitWonder Posted September 22 Share Posted September 22 Hello, I am not sure if this is intended behaviour but I was unable to locate any documentation on it so I am raising it here. There are two issues, one being related to the camera projection the other is a scene hierarchical issue with the camera but might also be relevant to other entities. Creating a camera as a child of another entity will mess up the projection. Here is my scene displayed in the editor vs how it looks through the camera's projection. Moving the camera to the root of the scene will display correctly. When creating a camera entity in the Scene Hierarchy with another entity selected it will create it as a child which is expected but it will first place that camera in the Entities subfolder until you reload your map then it will display as a child of the selected parent. I would prefer to manage my Scene Hierarchy myself and not that those default folders. Quote Link to comment Share on other sites More sharing options...
Josh Posted October 11 Share Posted October 11 Do you have a copy of the scene you can upload? 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 October 11 Share Posted October 11 I cannot reproduce this error in code. I would like to see the scene file so I can check of the parent entity is scaled. #include "UltraEngine.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, 1280, 720, displays[0], WINDOW_CLIENTCOORDS | WINDOW_CENTER | WINDOW_TITLEBAR); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a world auto world = CreateWorld(); //Environment maps auto specmap = LoadTexture("https://github.com/UltraEngine/Assets/raw/main/Materials/Environment/footprint_court/specular.dds"); auto diffmap = LoadTexture("https://github.com/UltraEngine/Assets/raw/main/Materials/Environment/footprint_court/diffuse.dds"); world->SetEnvironmentMap(specmap, ENVIRONMENTMAP_SPECULAR); world->SetEnvironmentMap(diffmap, ENVIRONMENTMAP_DIFFUSE); //Add a floor auto floor = CreateBox(world, 5, 1, 5); floor->SetPosition(0, -0.5, 0); auto box = CreateBox(world); box->SetPosition(0, 0.5, 0); auto camera = CreateCamera(world); camera->Move(0, 1, -3); camera->SetParent(box); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } 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...
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.