Dreikblack Posted November 6 Share Posted November 6 In ParticleEmitter class Instantiate and Copy are private. If i do it via Entitiy's Instantiate i getting ParticleEmitter with default mat and params. Copy() seems to copy a mat, but not params. #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(); //Create a camera auto camera = CreateCamera(world); camera->SetPosition(0, 1, -2); camera->SetClearColor(0.125f); //Create a particle emitter with 50 particles auto emitter = CreateParticleEmitter(world, 10); emitter->SetVelocity(0, 0, 0); emitter->SetParticleTurbulence(10000); emitter->SetMaterial(LoadMaterial("/Materials/default.mat")); auto emitter2 = emitter->As<Entity>()->Instantiate(world); emitter2->SetPosition(1, 0, 0); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; } Quote Link to comment Share on other sites More sharing options...
Solution Josh Posted November 6 Solution Share Posted November 6 fixed 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...
Dreikblack Posted Tuesday at 05:14 AM Author Share Posted Tuesday at 05:14 AM It still loading a default mat even though it uses another one Quote Link to comment Share on other sites More sharing options...
Josh Posted yesterday at 03:18 PM Share Posted yesterday at 03:18 PM I modified this behavior now. 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.