Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by wadaltmon

  1. And this becomes the case just by setting the physics mode to Entity::CharacterPhysics (2) and the collision mode to Collision::Character (3)? It continues even when using a different collider than the default?
  2. The SetInput function interests me, as it seems like it has a lot rolled into it that allows it to take the place of many lines of code, but doesn't block other functions from working in tandem with it. There are a few functions that it overrules (as stated in the documentation), but it provides acceleration, velocity, and rotation for a character while seemingly also overriding the default physics behaviors associated with force applied to a Model or Entity with a given collider applied. On that note, it also seems that it doesn't give you a maximum velocity; for if I use the SetInput function but also apply an extra force in a given direction, I can give that object a boost for a short time before the force dissipates. Anyone know of the equivalent code for SetInput? It seems to go beyond just AddForce(), SetRotation(), and/or SetVelocity(). Is it maybe a Move() function with some math to determine things like acceleration?
  3. Now these new collision functions are top tier. Exactly what I'm looking for. Would love to get a chance to beta test and try them out.
  4. I think that's what @JMK was referencing above, though directly via the Newton objects rather than through the Leadwerks collision API. Doing it as you suggest wouldn't give me the collision information, though, I believe - I'd still end up having to do multiple raycasts on each side to determine if the player is wallrunning. It seems like with the above mentioned new LW5 functions, I'd be able to know the closest point in the overlapping area of the collision shapes, and enact a single raycast from the center of the player object to that point to get the Face*, find the normal (at least, I'm presuming I can get the normal from a Face easily), and proceed to do the requisite simple vector math to find if the player should be wallrunning or not. Without the API support from the physics system, though, it precludes any avoidance of many raycasts every step (especially if I want to go beyond flat wallrunning and allow them to run on curved surfaces as well - which is a big goal of mine!)
  5. If I want to get LW5 beta access/begin a subscription, how can I go about doing so? Can I opt in somehow?
  6. I am not a beta tester, but if these functions are in the Turbo/LW5 beta, I'd certainly like to be. Is there a way I can opt in?
  7. The C++ Math::Cos function seems to be broken for me? If I put in any number from 0-360, times pi divided by 180, it always comes out with something above 0.99. Wot?

    1. Show previous comments  2 more
    2. wadaltmon


      Hm, didn't know it took degrees. Even so, putting in a degree value (that is, whole numbers 0-360) makes it in fact produce large numbers, the lowest of which being 4. I have no idea why this would be. Anyway, I just switched over to using the regular sin() and cos() functions, which work fine.

    3. gamecreator


      Tested it.  Works fine for me.  Make sure you provide a float or double as the argument.  For example the following all print 0.5:

      float f=60;
      double d=60;
      cout << "60.0: " << Math::Cos(60.0) << endl;
      cout << "60.0: " << Math::Cos(f) << endl;
      cout << "60.0: " << Math::Cos(d) << endl;


    4. wadaltmon


      I uninstalled and reinstalled Leadwerks, which seems to have fixed the issue (why this would have affected it, I don't have any clue).

  8. If I create my player's model by Model::Create(), is the Shape associated with that of a known size and type? Can I use that shape? If not, how do I change the shape of the collision model for the player without making a visible model that follows the player around all the time? I tried making a Shape* Cylinder of a given size, and using playerObject->SetShape(), but that didn't seem to change the collision model - it only created a separate visible model.
  9. This is a bit distinct from my problem, though. Take a look at the wallrunning in Titanfall: Once you come in contact with a surface, you're essentially attached to that surface for the time being. And this can be done from any direction - right side, left side, front and back (any direction in 360, in fact). I wanted to avoid having to use several raycasts all around the character at all given times, as the performance might be affected.
  10. Hello, Currently, I'm trying to implement a wall-running system, similar to the Titanfall games, in C++. The way I've thought it should work is to create a "cage" for the player (if the player is a cylinder, then create a cylinder slightly larger as the cage) and detect whether it is colliding with/overlapping another mesh, then if so, create an anchor point at the point of collision. Then, I can use a bit of math and raycasting with the normals of the ensuing surface to figure out the direction the player is moving and where they will end up next, but that part comes later. The main issue I'm having is actually creating these cylinders, and actually finding out the collision information. I can create a model for the player like so: Model* player = Model::Create(); So, if I wanted the player to be a cylinder, I could create: Model* player = Model::Cylinder(16); player->SetPosition(0, 4, 0); Model* cage = Model::Cylinder(16); cage->SetPosition(0, 4, 0); But this doesn't allow me to resize the objects. Furthermore, I'm wondering if Leadwerks has a way to obtain collision information in realtime on-demand. Is there something similar to the Pick system, allowing me to store collision information to a structure to check the point of collision? How would I change the collision type to make sure that my player still collides, but the cage doesn't?
  11. Is it possible to get a pointer to the current object(s) with which another object is colliding?

    1. JMK


      The collision function in script or in a C++ actor provides this.

  12. are Interact, Jump, and Throw method names, or are they constants?
  13. Interesting. So how does it read the different materials individually? Does it just read the different channels per pixel and interpret them individually? EDIT: Nvm, you literally said that in the first post
  14. What does a single map of this kind look like? I can't find any examples.
  15. wadaltmon


    That's exactly how I feel too. Creating a feature in C++ is easy, it's just finding the actual commands to interface with the API you're working with.
  16. wadaltmon


    I think having a basic setup tutorial would be helpful (as getting a window and camera set up with your API isn't exactly standard), but beyond that, the only thing I'd want is for everything in the API to actually be documented and searchable. There are a lot of things within LW4 that are simply not in the documentation, and are things one would run into pretty easily when going beyond basic functionality.
  17. Nice! This is exactly the kind of light source I was hoping to see in the next engine 😉
  18. @TheConceptBoy I think you've already done this with one instance. Is it possible to parent an existing or newly created model to a specific bone of an existing rig in LW?
  19. You spawned your gun as a Model* and your enemies as Entity*. If you change that, does it make a difference?
  20. I remember you were talking about animation time not being 1-to-1 from Blender to LW. Maybe bone-based animation does not abide by delta time, but the physics system does.
  21. Can confirm, ran this project and spawned 33 characters before my frames went down below 30. On debug, I spawned maybe 12 and my framerate went down to single digits.
  22. If the argument is for or against separately inputting the various maps, I'd say I'd like to have all the maps separate. Makes it far easier to establish and then change just one if necessary or for testing. Granted, with one Male you'd just be re-exporting one map and replacing that in LW/TE, but you'd have to go through a middleman to mix the exports into one.
  23. Is it standard to mix the various maps into a single image? If so, why would that necessarily be better off than keeping them separate?
  24. I have the maps themselves already exported from Substance Painter, just displaying them in Blender by basically assigning all those maps to separate objects in Blender (assign each individual object its own set of diffuse, normal, metallic, roughness). So I probably won't actually be re-exporting the maps from Blender, just the model itself will be exported. So in LW, does each texture that I apply have to be UV mapped to the overall model, or could it be UV mapped to a given subset of vertices on the model after I export it all as a single FBX? Sorry if I don't use the proper terminology with this stuff; I'm not hugely entrenched in the whole art aspect of games creation.
  25. Hi everyone. I've got a gun object that has been created with Blender, and with textures/maps imported from Substance Painter. It's a single gun, but it's made up of several objects each with different materials and map sets (diffuse, normal, etc.). I've got these imported into the Blender 2.8 shading tab with their own nodes , and I also modified the overall specular value in the nodes too, but that should not be an issue as I think you can modify that in LW's material editor. I'd like to export the gun as an FBX to use as my first-person view model, and texture it with all of these maps and materials. Does Leadwerks allow me to use multiple materials on the same FBX model? If so, how would I go about doing so? It is also worth noting I plan on using a pseudo-PBR shader, as seen here: https://steamcommunity.com/sharedfiles/filedetails/?id=401506836&searchtext=Pbr . As such, I have a diffuse map, normal map, specular map (inverted roughness map colors), metallic map, and a skybox map (probably from the default skybox given with Leadwerks).
  • Create New...