Jump to content

T0X1N

Members
  • Posts

    127
  • Joined

  • Last visited

Everything posted by T0X1N

  1. T0X1N

    Beta update available

    Hmmm... The child shadows (under point lights & spotlights) are still not rendering in C++. They are fine in the editor, but not in C++.
  2. T0X1N

    Beta update available

    I can confirm that the shadow issue is now fixed in this update. Good job! Now, I await eagerly for the C++ library to update.
  3. Adding entities to the flowgraph is currently a cumbersome process, especially when the map is large and the scene tree is chuck full of entities. Right now, you are required to scroll through the Scene Tree for the object, make sure the Flowgraph window is up, and then click and drag the object from the scene tree to the flowgraph window. This is okay if your scene is relatively small, but this process can be simplified and not having to waste time looking for the object in the scene tree. My suggestion is to have an "Add Selection To Flowgraph" in the Edit menu. Simply select an object (in either the scene tree or through the perspective view) and click on Edit->Add Selection To Flowgraph. A bonus would have a key combo like CTRL+ALT+E or any other shortcut that can be pressed with one hand on the left side of keyboard, so users are not required to take their hand off the mouse. My thought process behind CTRL+ALT+E is "E" for EDITOR as in Flowgraph editor. CTRL+ALT+Shift+E could mean remove from Flowgraph Editor. Why ALT too? Because just CTRL+E could mean OPEN UP Flowgraph editor, the addition of ALT means ADD TO flowgraph. Another possibility could be CTRL+ALT+L "For LOGIC", because that is what the Flowgraph is, a logic editor. I don't like this one as much because you would either need both hands or move one hand all the way from one side of the keyboard to the other. Another possibility is to have the option to right click on the object inside the Perspective view or grid view, and the "Add Selection To Flowgraph" would be a choice in the drop menu. ** Note: ** I figure if the user has multiple objects selected, and if the system does not support multiple objects being added to the flowgraph editor at one time, just grey out/disable the option in the menu until only ONE entity is selected.
  4. I added my support. I would like to know how well this works.
  5. T0X1N

    Beta update available

    That's odd. There is a camera in the scene. Don't know why it did not load up for you. I PMed you the full project.
  6. A search function, "move to folder", and "collapse all" would be very handy tools here. That scene tree right now is... gah... I don't fancy using it. Especially when maps get large... it is scrolling hell.
  7. T0X1N

    Beta update available

    Here is a map file that demonstrates the issue at hand. If you replace the point light with a directional light, it renders fine, but with point lights and spotlights, the issue is apparent. http://toxingames.com/leadwerks/shadowissue.zip
  8. T0X1N

    Beta update available

    http://www.leadwerks.com/werkspace/topic/15716-43-child-entities-do-not-cast-shadows/ This issue seems to be "sort of" fixed for the editor, but not in-game (compiled with C++). Did you update the C++ library in the beta branch? I say "sort of" because it now renders shadows, but when you move a child entity, the shadow does not update. Only if you move the parent entity then the shadows for all of the children will update. I did set the shadows to "dynamic" for both the parent and the child.
  9. Good! I'm glad I am not the only one now! It sounds Reepblue's issue was just with the editor, but not in-game. The problem is, my issue happens in-game too, not just the editor. I have a bunch of torches and other objects in my maps have parent entities. Before this update, they were working great, casting nice shadows. However, after this update, they do not cast shadows. So now everything looks flat.
  10. Change the light in your scene to a point light. It seems the issue I am having is with point lights and spot lights in this update.
  11. Everything was working fine before this update. After updating to 4.3 I am having this issue. I had made sure that the pivot or any parent entity had shadowmode set to "static" and child entities do not render shadows. The children entities are set to "static" too. I am able to recreate this issue if I had another model with "Static" shadows in place of the pivot. Two models, the parent casts shadows, but the child does not.
  12. This is a bug that is found in the new update (4.3). Models with either "Dynamic" or "Static" never cast shadows if it has a parent. By removing the parent and have the model by itself, it casts shadows. Sames goes for CSG brushes. See screenshots:
  13. Thank you for posting this article! It really has some great analogy on the character controller and Leadwerk's scaling. Very helpful! This crouch issue is actually a real pain, and I am surprised this issue was not fixed yet since this article is more than a year old and it concerns a pretty crucial part of the engine, character controllers! I will have to avoid using the crouch commands because of the step height. It will be unnatural and a real annoyance to the player that they cannot step on things that is not higher than 8cm, although in my tests, I cannot step on anything above 1cm in height while crouching, which is ridiculous. Now, the problem is, how will I go about going around this issue? I have tried "SetHeight" to the controller, and that does not seem to work. I have tried to set the height to a very small number of 0.0005, and the controller is still not able to fit into an area that was previously accessible using the crouch command. I rather would not to not put up ramps for all of my steps and areas that there is any height differentiation, that will just be a real mess. **** EDIT **** I thought about it for a while and came up with a simpler solution... I will use the crouch command, although, I will only use it if the world tells I have to. So in my program, if the player crouches, it will simulate that the character is crouched as the camera will go in the crouched position, but the controller will not be crouched. It will only start crouching when it collides with a trigger zone telling the controller to start using the engine's crouch command. I think this is the better solution that I can think of. Although, there will need to be some work putting in place of all the zones where the character controller's crouch height is needed (IE: vents, small spaces, etc.)... but that is game development... Some good comes out of this way because the designer has more control of the player's crouching mobility. Meaning there is less chance that the player can glitch out the controller or map and get into spaces that the designer does not want the player to squeeze into.
  14. I have noticed that when the character controller is crouched, the controller's step height is ignored and will not step over anything. Am I missing something or is this a bug?
  15. Nevermind. I found my answer by digging into the Collisions class. For anybody that wants to know, here is an example of creating a 9th collision type that only collides with triggers. Collision::SetResponse(9, Collision::Trigger, Collision::Trigger); Simple as that. Although, why is this command not in the documentation?
  16. How do you create and setup new collision types? My goal is to create a special collision type to only collide/trigger "Trigger" collision types and nothing else. Thanks!
  17. Ah, yup! You were right! In my code when I call the function, I forgot to tell it to call the function using the entity's parent script (which is the one that has the script). After fixing that, it works perfectly. Here is the fixed code: if( pickInfo.entity->ContainsFunction("Hurt") ){ // CALL HURT FUNCTION CallHurtFunction(pickInfo.entity, damage); }else if( pickInfo.entity->parent != NULL ){ if (pickInfo.entity->parent->ContainsFunction("Hurt")) { CallHurtFunction(pickInfo.entity->parent, damage); } } Thank you for helping me. I can now say I learned something new today with Leadwerks and now a just another step closer to getting our game done!
  18. Ok, now we are cooking. However, I am facing some issues. Here is my function that I wrote which is basically a duplication of the CallFunction source that you posted with a few edits to just use "Hurt" function. bool FPSplayer::CallHurtFunction(Entity* entity, const int damage){ if (entity->component == NULL){ System::Print("ENTITY COMPONENT IS NULL!"); return false; } bool success = false; //Get the stack size to restore int stacksize = Interpreter::GetStackSize(); //Get the global error handler function int errorfunctionindex = 0; #ifdef DEBUG Interpreter::GetGlobal("LuaErrorHandler"); errorfunctionindex = Interpreter::GetStackSize(); #endif entity->Push(); Interpreter::GetField("script"); if (Interpreter::IsTable()) { Interpreter::GetField("Hurt"); if (Interpreter::IsFunction()) { System::Print("HURT FUNCTION EXISTS..."); Interpreter::PushValue(-2);//Push script table onto stack Interpreter::PushInt(damage); #ifdef DEBUG errorfunctionindex = -(Interpreter::GetStackSize() - errorfunctionindex + 1); #endif success = Interpreter::Invoke(2, 0, errorfunctionindex); }else{ System::Print("GetField(HURT) is False \n"); } } else { System::Print("IsTable() is false \n"); } Interpreter::SetStackSize(stacksize); return success; } and I am calling the function using this if( pickInfo.entity->ContainsFunction("Hurt") ){ // CALL HURT FUNCTION System::Print("HAS HURT FUNCTION... Calling! \n"); CallHurtFunction(pickInfo.entity, damage); }else if( pickInfo.entity->parent != NULL ){ if (pickInfo.entity->parent->ContainsFunction("Hurt")) { System::Print("HAS HURT FUNCTION... & Parent... calling! \n"); CallHurtFunction(pickInfo.entity, damage); } } However, it comes back that 'component' is NULL. If I take that away, the 'Interpreter::IsTable()' comes back false. I know I am doing something wrong here, obviously, as this is new to me. Again, thanks for the help. I really appreciate this.
  19. I don't think I quite understand this yet. Do I have to write a Entity::CallFunction function in my c++ source code? If I do, how would I go about adding the int "damage" to the code since I cannot create a new declaration to the Entity:: class. Plus, would this function act as a Hook function? What is the "extra" object? Can't I use that to store the data in? If so, how could I go about storing the 'damage' variable into an Object class variable? Also, is it possible to have an example source code snippet that calls a function in LUA from C++ with custom parameters that I can look at to learn off of? That would be extremely helpful as I learn by example mainly. Thanks for the help!
  20. How do I specify parameters in C++ with Entity::CallFunction? Example, I have a "Hurt" function defined as the following: function Script:Hurt( damage ) In my C++ program, I want to call the "Hurt" function and specify the "damage". I found an old forum post (http://www.leadwerks.com/werkspace/topic/10745-passing-parameters-to-lua-via-callfunction/page__hl__entity::callfunction#entry78846), but I still do not understand how to specify parameters. I would like to do the following in my C++ program: entity->CallFunction("Hurt", damage)
  21. I wish you could draw/modify CSG brushes in the perspective mode. This would allow users to just use 1 perspective for GUI simplicity and the convenience of not having to constantly switch to and from 2D graph perspectives to get the shape you need. You can just basically build your map in 3D visual form. Also, this can be useful when maps start getting large and the 2D graphs start getting cluttered with wires from other brushes. Looking at that 2D wireframe graph on large maps are sort of a pain. This type of editing could be compared to the Unreal Engine's editor or Autodesk Maya where you can draw in 3D space. Drawing CSG from scratch in 3D space could go like click LMB and drag the shape in perspective view, release to make it. The height of the brush would be determined from the last brush you selected (just like how the editor does this now). Here is a mock-up screenshot of how I think it could look like: Or, instead of the anchor points on the edges, have them positioned on the faces, like so:
  22. Since this command is not documented, is it okay to use Entity::CallFunction to call a LUA function in C++? Is there a possibility that this command will be depreciated in a future update? Thanks!
  23. Oh wow, I must have missed these commands! Thank you! Works like a charm!
×
×
  • Create New...