Jump to content

Josh

Staff
  • Posts

    23,265
  • Joined

  • Last visited

About Josh

Profile Information

  • Location
    USA

Recent Profile Visitors

1,351,773 profile views

Josh's Achievements

Grand Master

Grand Master (14/14)

  • Well Followed
  • Dedicated
  • Conversation Starter
  • Reacting Well
  • Problem Solver

Recent Badges

14.6k

Reputation

599

Community Answers

  1. I forgot to include the terrain height in the instance positions in the physics thread, and it only works on flat terrain. Will finish it tomorrow.
  2. 0.9.6 Added support for collision with terrain mesh layers. For player collision, I spawned a bunch of temporary physics bodies around the player, which eliminates some of the issues Leadwerks has with player collision on vegetation. I forgot about mesh layers integrating into the navmesh pathfinding system, so that's the last part of this system that I will do tomorrow.
  3. In the next build that goes up, this will provide a good test of collision with mesh layers: #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; const WString remotepath = "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/"; int main(int argc, const char* argv[]) { RegisterComponents(); //Get the primary display auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280*2, 720*2, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a rendering framebuffer auto framebuffer = CreateFramebuffer(window); //Create a world auto world = CreateWorld(); //Create a camera //auto camera = CreateCamera(world); //camera->SetPosition(0, 2, 0); //camera->AddComponent<CameraControls>(); //camera->SetCollisionType(0); auto player = CreatePivot(world); player->SetPosition(0, 2, 0); auto component = player->AddComponent<FirstPersonControls>(); //component->camera->AddPostEffect(LoadPostEffect("Shaders/SSAO.fx")); //component->camera->SetClearColor(0.125); //Create a light auto light = CreateDirectionalLight(world); light->SetRotation(65, 35, 0); //Create a terrain auto terrain = CreateTerrain(world, 512, 512); //Add a mesh layer auto model = CreateBox(nullptr, 4); auto meshlayer = terrain->AddMeshLayer(model, 8.0f); meshlayer->Fill(); meshlayer->SetCollisionType(0, COLLISION_SCENE); meshlayer->SetShadows(0, true); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { /*if (window->KeyHit(KEY_SPACE)) { ball->SetPosition(player->position); ball->SetVelocity(0, 0, 0); ball->AddForce(TransformNormal(0,0,1, player, nullptr) * 200.0); }*/ world->Update(); world->Render(framebuffer); } return 0; }
  4. How do you know that layer1Amount equals 40? That seems very odd to hard-code the array size. You can use #uagc_clouds to get the array size.
  5. Try this: self.mesh2 = Model(self.mesh2) self.mesh2:SetSkeleton(self.mesh.skeleton)
  6. The user reported that the console is continuously printing "Invalid operation" errors while the game runs.
  7. Why is the image link broken?
  8. The false argument should prevent the null character from being written at the end.
  9. 0.9.6 Added terrain mesh layer picking, which means 3/4 of my tasks I listed for the week in Saturday's meeting are already finished. The PickInfo structure now has an integer for the index of the mesh layer and an iVec2 for the exact picked instance.
  10. 0.9.6 Foliage tool will now make use of slope and height constraints. Imposter generation will now remove a previously generated imposter, if it is found, so you don't have to manually delete those each time you update the imposter.
  11. Josh

    Test Tree

    I have been using this model a lot for testing the foliage system. oaktree_d.zip
  12. 0.9.6 Imposter lighting corrected. I also made some corrections to how the imposter images are generated, so I recommend recreating these. Make sure you delete the old imposter mesh and LOD from the model hierarchy before creating a new one.
  13. Maybe there is a shader compile error earlier in the log?
  14. bool SaveTable(table& t, const WString& path) { std::string s = t.to_json(); auto stream = WriteFile(path); if (stream == NULL) return false; stream->WriteString(s, false); return true; }
×
×
  • Create New...