All Activity
- Today
-
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.
-
The Leadwerks Stream class lacks such an override.
-
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.
-
Josh started following Longtime weird LUA occurances and Mesh layer collision
-
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; }
- Yesterday
-
ThatWhichLeads joined the community
-
The first step towards moving the Controller into a full blown Framework kit has been installed. UAGC now features an EcoSystem module, the first module contains a cloud system. These dynamic, moving clouds can be turned on or off via the editor component menu when dropping the ecosystem component onto the map.
-
Yah I saw that error as soon as I posted this message. Seems to be NO WAY to delete a topic anymore so I had to just leave it.
-
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.
-
Alienhead started following SetLodDistance () and Longtime weird LUA occurances
-
This has been happening awhile but I haven't came back to it yet because i havent needed to do anything like this until now. Here is some the code: --- Start the clouds for t=1, self.layer1Amount do uagc_clouds[t].mesh = self.layer1Cache[math.random(1,self.layer1TypeCount)]:Instantiate(world) uagc_clouds[t].mesh = Model(uagc_clouds[t].mesh) uagc_clouds[t].mesh:SetHidden(false) uagc_clouds[t].mesh:SetPosition(player.entity:GetPosition()) uagc_clouds[t].mesh:SetPickMode(0) local anum = math.random(self.minScale, self.maxScale) uagc_clouds[t].mesh:SetScale(anum, anum, anum) uagc_clouds[t].mesh:Translate(math.random(-self.maxDist,self.maxDist), math.random(self.minHeight,self.maxHeight), math.random(-self.maxDist,self.maxDist)) uagc_clouds[t].mesh:SetLodDistance(self.lod1, self.lod2, self.lod3) uagc_clouds[t].speed = Random(self.maxSpeed/2, self.maxSpeed) end --->> Move the clous for t=1, 40 do uagc_clouds[t].mesh:Translate(0,0,1) --- THIS LINE ERRORS OUT !, says uagc_clouds[t].mesh is nil when clearly the code above sghows it isnt. end
-
Found it: uagc_clouds[t] = Model(uagc_clouds[t]) uagc_clouds[t]:SetLodDistance(50, 60, 70)
- 1 reply
-
- 1
-
Model::SetLodDistance parameters changed, up to four LODs are supported. Changed to what ?
-
Alex Hoxdson joined the community
-
Andy90 started following Prefabs dragged
-
i think it can be related to this bug
-
Try this: self.mesh2 = Model(self.mesh2) self.mesh2:SetSkeleton(self.mesh.skeleton)
-
Alienhead changed their profile photo
-
Sent it up again, wasnt broken on my end however.
-
The user reported that the console is continuously printing "Invalid operation" errors while the game runs.
-
Josh started following SetSkeleton()
-
Why is the image link broken?
-
The false argument should prevent the null character from being written at the end.
-
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.
-
Alienhead started following SetSkeleton()
-
Why do I get this when using the command self.mesh:SetSkeleton(self.mesh2) ?? Do the two models have to be identical even this the bone rig is identical ? This is my code that bottoms out. self.world = self.entity:GetWorld() self.mesh = LoadModel(self.world, self.playerModelFilenname) self.mesh2 = self.mesh:Instantiate(self.world) self.mesh2:SetScale(1.35,1.35, 1.35) self.mesh2:SetSkeleton(self.mesh)
- Last week
-
I had to use WriteLine for Leadwerks as WriteString wrote extra data at the end. Much appreciated!
-
Error: Surface drawn with no active shader.
CJO Games replied to CJO Games's topic in Leadwerks Engine Bug Reports
Fixed! I had to completely remove the project files from Documents and then set up a new project and now it works with no problems! -
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.
-
Pleca started following Error: Surface drawn with no active shader.
-
It's working! My bad sorry.
-
-
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.
-
Error: Surface drawn with no active shader.
Josh replied to CJO Games's topic in Leadwerks Engine Bug Reports
Very likely!