Jump to content

reepblue

Developers
  • Posts

    2,657
  • Joined

  • Last visited

Recent Profile Visitors

110,095 profile views

reepblue's Achievements

Mentor

Mentor (12/14)

  • Well Followed
  • Problem Solver
  • Dedicated
  • Conversation Starter
  • Very Popular

Recent Badges

1.3k

Reputation

23

Community Answers

  1. #include "Leadwerks.h" using namespace Leadwerks; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Leadwerks", 0, 0, 1280, 720, 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); camera->Listen(); //Create a light auto light = CreateBoxLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); //Create a box auto box = CreateBox(world); box->SetColor(0, 0, 1); //Sound auto sound = LoadSound("https://raw.githubusercontent.com/Leadwerks/Documentation/master/Assets/Sound/notification.wav"); auto speaker = CreateSpeaker(sound); speaker->SetLooping(true); speaker->SetPosition(box->GetPosition(true)); speaker->Play(); speaker->SetRange(10); //Main loop bool swapped = false; while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { //Add filter when space key is pressed if (window->KeyHit(KEY_SPACE)) { swapped = not swapped; if (swapped) speaker->SetFilter(AUDIOFILTER_REVERB_SEWERPIPE); else speaker->SetFilter(AUDIOFILTER_NONE); } //Move and turn with the arrow keys - best experienced with headphones if (window->KeyDown(KEY_UP)) camera->Move(0, 0, 0.1); if (window->KeyDown(KEY_DOWN)) camera->Move(0, 0, -0.1); if (window->KeyDown(KEY_LEFT)) camera->Turn(0, -1, 0); if (window->KeyDown(KEY_RIGHT)) camera->Turn(0, 1, -0); world->Update(); world->Render(framebuffer); } return 0; } It'll work the first time, then it'll work when you go to set it back to none. However, when you try it again, it doesn't work.
  2. There's no HUD icons with the FPSPlayer because when we put this together, the UI system wasn't finalized. To be honest, I think this is a great opportunity to show off how to set up the outline effect.
  3. It will still generate a json file like so. { "autogenerated": true, "component": { "inputs": {} , "outputs": {} , "properties": {} } }
  4. I'm noticing that the editor will take the liberty and clear json files on the stock components as they don't have their variables commented. The editor has made me have to redo a few scripts. I was under the impression that the editor would leave these alone if autogenerated was false or not defined. I'd like to be able to turn this off if possible.
  5. The setting works per material, but the entity values aren't being applied. indicator_strip_shared.zip
  6. I brought this up in the discord and now I'm posting it here. It seems that models that have a collision mesh get additional padding on the 2D grid view. This can make it hard to scale certain models like pipes. No collision box After adding a box collision shape.
  7. All good with 572.70 with my 4070. I kind of don't want to upgrade now seeing what's happening. :|
  8. Agreed. I've brought this up multiple times. I only used the local gizmo to see what was considered an entity's forward direction.
  9. K3nt on Discord has been begging for this feature for the longest time. You can hide faces in the editor. There's no need for a tool brush. I suggested this back in 2023.
  10. I'd like to see thumbnail images of the prefabs in the editor like I could in Leadwerks 4.
      • 5
      • Upvote
  11. Like I said on a workshop meeting, I like to take an existing particle effect and use it as a starting point for my own effect. Having a library of effects would be very helpful.
  12. virtual bool Attach(shared_ptr<Hmd> hmd); virtual bool Attach(shared_ptr<VrController> controller); I've tried these methods per your suggestion and both don't work as intended. When you attach a model to the Hmd, it's doesn't seem to consider the offset even when you move the said model it is. if (!head) { head = CreateSphere(world, -0.14f); head->SetCollider(nullptr); head->SetShadows(false); head->SetColor(0.0f, 0.0f, 0.0f, 0.0f); head->SetPosition(entity->GetPosition() + hmd->GetPosition()); head->Attach(hmd); auto mat = CreateMaterial(); mat->SetShaderFamily(LoadShaderFamily("Shaders/Unlit.fam")); mat->SetThickness(0); mat->SetTransparent(true); head->SetMaterial(mat); mat = NULL; } The entity update at all when attach to the controller. // Update the model. auto mdl = GetController(weapon_controller); if (weapon && mdl) { if (weapon->extra == NULL) { weapon->SetMatrix(mdl->GetMatrix(true), true); weapon->SetHidden(false); mdl->SetHidden(true); weapon->Attach(hmd->controllers[weapon_controller]); weapon->extra = Self(); } else { //weapon->SetMatrix(mdl->GetMatrix(true), true); } } If you need the project, let me know.
  13. While it's confirmed that the listener is attached to the hmd by default, it seems that the listener's position doesn't update when Hmd::SetOffset() is changed.
  14. Maybe it might be worth considering drawing both eyes like you've done in Leadwerks 4 as you can better watch what's actually happen.
  15. 1. Open up editor. 2. Create Box. 3. Select it. 4. File -> New, ignore changes 5. This should be the result.
×
×
  • Create New...