Jump to content

GorzenDev

Members
  • Posts

    141
  • Joined

  • Last visited

Everything posted by GorzenDev

  1. I have been working on a menubar widget and it came out pretty nicely. I thought i would release it either for people to have an example of what would be possible with the widget's flexibility or just for people to use it. For now it only works in C++ since it makes use of CallFunction(). MenubarElement.lua !! Make sure when you create the widget you create it last so it will render on top !! It allows horizontal rules and submenus. How to use: (C++) Create the widget and fill the menu float scale = gui->GetScale(); mnuBarItem = Widget::Create("Name", 2 * scale, 2 * scale, 60 * scale, 26 * scale, gui->GetBase(), "Scripts/GUI/MenubarElement.lua"); mnuBarItem->SetObject("backgroundcolor", new Vec4(0.7, 0.7, 0.7, 1.0)); mnuBarItem->AddItem("Temp0"); mnuBarItem->AddItem("Temp1"); mnuBarItem->AddItem("@-");//create a horizontal rule(menu seperator) mnuBarItem->AddItem("&Submenu");//this will hold the submenu created next //create a submenu from the last added item in the list mnuBarItem->CallFunction("C_CreateSubMenuFromLastItem"); mnuBarItem->CallFunction("C_AddItemToLastSubMenu", "Sub0_A"); mnuBarItem->CallFunction("C_AddItemToLastSubMenu", "Sub0_B"); mnuBarItem->CallFunction("C_AddItemToLastSubMenu", "Sub0_C"); // mnuAccount->AddItem("Temp2"); Catching widget events ProcessEvent(Event event) { if (event.id == Event::WidgetAction) { if (event.source == mnuBarItem) { if (event.data == 0) { // } else if (event.data == 1) { // } //(event.data == 2) horizontal rule // else if (event.data == 3)//submenu { int item = event.position.x;//submenu itemidx if (item == 0) { // } else if (item == 1) { // } else if (item == 2) { // } } else if (event.data == 4) { // } } } } Also it needs a call to update somewhere in your loop. Which is just used to update some delay timing. mnuBarItem->CallFunction("C_Update");
  2. try embedding the materials into your fbx during export.
  3. I found the culprit. It whas actually the hitbox created in the start function of the FPSPlayer script which i overlooked. In my defense this hitbox whas never part of the FPSScript last time i used it.
  4. I have combined all my model surfaces into 1 surface and pick still returns prop collision. I have checked every single entity in my scene and made sure none have a Collision:Prop. I even went all the way and attached a script with pickmode(0) to every single brush and even all the skeleton bones. It still returns the same result. This is an impossible situation there is no way pick should return collision on something with collisiontype prop since there simple is nothing having that collision type in my scene. "Frustration starts to build" Nobody had similar problems and have an idea what could be wrong?
  5. I am working on a third person controller with 'over the shoulder view', all thats left to do is camera collision/occlusion. I do a world:pick from the camera's lookat target back to the camera, then check distance etc. But the problem is my pick hits the character, or so it says. I know this sounds like a noob problem and it may as well be for all i know. I set pickmode and collisiontype in the modelscript. self.entity:SetPickMode(0, true) self.entity:SetCollisionType(Collision.None, true) During picking i print some stuff. local distance = -1.0 local pickInfo = PickInfo() if world:Pick(p0, p1, pickInfo, 0, true) then System:Print("camera occluded by: "..pickInfo.entity:GetClassName()) System:Print("name: "..pickInfo.entity:GetKeyValue("name")) System:Print("collisiontype: "..pickInfo.entity:GetCollisionType()) distance = p0:DistanceToPoint(pickInfo.position) end The weird thing is the print results. I checked and collisiontype 1 = Collision:Prop. How is it possible my model has collisiontype 1 ? Could it be because my model has multiple surfaces ? Anybody has an idea?
  6. thank you very much for pointing me in the right direction. my apologies for posting this in the bug reports i realize this should have been posted in programming
  7. Creating a new project through the editor and compiling that straight away results in the same error. somehow it has a problem with Leadwerks.lib(Face.obj) ??? I have not changed anything.
  8. After all these new little updates i no longer can compile any c++ project. gives error: this a new project with all my codes commented out to make sure its not me. this problem persist using 4.5 and even beta. grabbing an older project and trying to compile, results in the same compile error.
  9. very informative. now i actually have doubts about ordering the htc vive
  10. my Kaspersky doesnt find any virus in steam or leadwerks so might be a false positive.
  11. if you are using vs2017 and have heap profiling enabled it will drop your fps significant
  12. Does clamp get a proper result when negative values are used? Since in that case the self.maxZoom would be the smallest value of the 2. maiby flip them around ? During optimisation i did at one point use clamp but got a bad result so reverted it back and never looked at it again.
  13. FYI the z index of mouseposition is cumulative. To get proper values you could do something like: local oldWheelPos = 0.0 if self.currentMousePos ~= nil then oldWheelPos = self.currentMousePos.z end self.currentMousePos = window:GetMousePosition() self.currentMousePos.x = Math:Round(self.currentMousePos.x) self.currentMousePos.y = Math:Round(self.currentMousePos.y) local newWheelPos = (self.currentMousePos.z - oldWheelPos) * 0.1 if newWheelPos > 0.0 or newWheelPos < 0.0 then self.curZoom = self.curZoom + newWheelPos if self.curZoom < self.maxZoom then self.curZoom = self.maxZoom elseif self.curZoom > self.minZoom then self.curZoom = self.minZoom end end
  14. 2 more weeks and my HTC VIVE will arrive i cant wait to start playing with VR development.
  15. like aggrorjorn said. but also take a look in menu.lua you can also take a look at my blog its C++ but very similar to how you would use lua.
  16. i hope i understand your problem correctly. But as i see it, you would have to manually set the color back to its original color.
  17. As it turned out i do have a high res mouse. Updated mouse software, restarted and the issue is resolved. Thank you guys for help. my OS is win10 btw. Edit: back to 4.4 and all is oke
  18. Hmm i did that just now and the problem persists.. actually starting to worry a bit now. So this is what's happening in detail: When pressing and holding right mouse button in the perspective viewport, the cursor gets hidden as it should. Moving the mouse does not rotate the camera, better yet the mouse actually appears when moving outside the viewport rectangle.
  19. I'm baffled as to where the problem may lay, like you said nothing has changed either in LE or on my PC. I'm also reluctant to opt into beta and rather wait for stable release, as in my opinion developing a game with a version that is prone to (big)changes could end into more work for me. Using cpp so luckily the editor is only used during map development. So for now i think i choose to wait and continue work on the map once 4.5 is no longer beta.
  20. after updating nvidia the issue still persists. rebooting/restarting steam/pc did not fix the issue. so im guessing updating to 4.5 is the only way to fix.
  21. Turning/Moving the camera in the perspective viewport stopped working for some reason. It whas working fine yesterday. This is using leadwerks 4.4. The things that do work is: Panning/Zooming (scroll wheel). The things that dont work anymore: Moving (ASWD). Up/Down (QE). Panning (Arrow Keys). Is this a bug or did i accidentally change a option somewhere? (i've tried changing some options in config but no changes)
  22. i am not sure to be honest i have never tried assigning a function pointer to a widget. i usually just check event.source against a widget pointer and call a specific class function corresponding to that widget.
  23. as far as i know that is the only way.
  24. There is a problem with the default TextArea.lua widget script. Your game will crash when you click on an empty TextArea. Fix: look for the Function "Script:GetCaretCoord(caret)" after: local text = self.lines[self.currentline]--self.widget:GetText() add: if text == nil then return 0 end More will be added when/if discovered...
×
×
  • Create New...