Announcement

Collapse
No announcement yet.

Able Ability System Info and Support Thread

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by soctty View Post

    So if I'm understanding this correctly... assuming two character descendants in the transaction, the 3D cone is only going to detect a collision with what amounts to its leading bottom edge, and only if the other character's location is a point on that line?

    E.g., Scotty stands at 0,0,0 and projects a cone (500 FOV, 100 length) forward, and it only detects Matt if Matt is standing at 100,0,0?

    Or would the same cone catch Matt jumping in place from say, 90,0,0?
    500 FOV is slightly meaningless as it's going to get wrap around to 0 - 360 (so, 500 would 140 degrees). It should catch either of your examples, but if the "Matt" character was close (say 20 units away), I could definitely see the cone missing that as that cone expands along the length (but 2D would grab it).
    Able Ability System - A high performance, robust ability system for UE4. Now Available!

    Comment


      Originally posted by ExtraLifeMatt View Post

      500 FOV is slightly meaningless as it's going to get wrap around to 0 - 360 (so, 500 would 140 degrees). It should catch either of your examples, but if the "Matt" character was close (say 20 units away), I could definitely see the cone missing that as that cone expands along the length (but 2D would grab it).
      Yeah, definitely should've been "height" instead of "FOV" there. Tunnel-vision bit me on that.

      This has been super informative, though. I've only been working with 2D cones until now, and it definitely would've thrown me for a loop whenever I got into 3D.
      @thereisnoscotty
      Grand Marshal of the Parade of Madfellows

      Comment


        Originally posted by soctty View Post

        Yeah, definitely should've been "height" instead of "FOV" there. Tunnel-vision bit me on that.

        This has been super informative, though. I've only been working with 2D cones until now, and it definitely would've thrown me for a loop whenever I got into 3D.
        Again, I'll double check. But when I did a pretty exhaustive look at 3D cone a few weeks back - the math was always correct and it was always my assumption of where the player was in relation to that cone that was wrong (e.g., I move the character back just a tad and it hits it). The fact that the Debug Draw is totally wacky doesn't help show that fact, so I'll definitely re-write that portion.
        Able Ability System - A high performance, robust ability system for UE4. Now Available!

        Comment


          Originally posted by soctty View Post

          Sorry, I misspoke earlier. I meant to say it's a part of the returned hit struct, not that values are being passed inherently. I did some experimentation with returning physical materials some time ago and found it to be a bit of a pain. It looks like, since they are Objects, Able Abilities don't have direct access to some of the things you need to make this work, so take a look at the screenshots here: https://imgur.com/a/WbPiwxU
          Ah gotcha! And thank you for uploading those images too.

          Having the interface approach is not totally feasible in this scenario as this hitscan is used for bullet impacts and it could hit simple meshes too, not just actors. To support that, I created a method in a Blueprint Function Library that would do the material extraction as you suggested.

          But I noticed that the the Face Index is coming up as "-1", on both approaches - interface or function library.

          This is also a parameter that you could provide to your hitscan, via FCollisionQueryParams (parameter "bReturnFaceIndex"). This is also similar to the physical surface ("bReturnPhysicalMaterial"), but these are not exposed in the Able Editor.

          I'm considering creating a custom ray trace task for this context, but I still feel I might be missing something as it would be odd that such simple things wouldn't be available OOTB. And as you said, it seems that you have a working solution, right?

          In any case, thanks again for the help!


          Comment


            Originally posted by urielninjabear View Post

            This is also a parameter that you could provide to your hitscan, via FCollisionQueryParams (parameter "bReturnFaceIndex"). This is also similar to the physical surface ("bReturnPhysicalMaterial"), but these are not exposed in the Able Editor.
            If you see something not exposed in Able it's generally because 1.) I don't use it in my own projects, or 2.) No one asked yet. It's trivial to expose those and I have some outstanding work to do in Raycast Task anyway, so I'll toss these in as well.
            Able Ability System - A high performance, robust ability system for UE4. Now Available!

            Comment


              Originally posted by ExtraLifeMatt View Post

              If you see something not exposed in Able it's generally because 1.) I don't use it in my own projects, or 2.) No one asked yet. It's trivial to expose those and I have some outstanding work to do in Raycast Task anyway, so I'll toss these in as well.
              Ah that's great, thank you for the info! Makes sense.

              So, to summarize what I'm seeing right now, the ablRayCastQueryTask performs the traces between lines 75-103, where 1 out of 4 traces will be executed depending on the task setup. They all use a version of the trace calls from the World class, using 4 arguments.

              The 5th argument that's being omitted would be a FCollisionQueryParams with the flags above. The default version of this struct that's being used is initialized with those flags set to false.

              Comment


                Originally posted by ExtraLifeMatt View Post

                Again, I'll double check. But when I did a pretty exhaustive look at 3D cone a few weeks back - the math was always correct and it was always my assumption of where the player was in relation to that cone that was wrong (e.g., I move the character back just a tad and it hits it). The fact that the Debug Draw is totally wacky doesn't help show that fact, so I'll definitely re-write that portion.
                I didn't mean to say it needed to be double-checked, just that I meant to say "height" where I said "FOV". I was agreeing with you, I just didn't communicate that very clearly. My bad.

                The height of 500 was to ensure it'd be tall enough at the far extent to hit a roughly six foot tall humanoid's root position, assuming both are standing on the same plane at roughly the same elevation. I goofed and said nonsense instead.
                @thereisnoscotty
                Grand Marshal of the Parade of Madfellows

                Comment


                  Originally posted by urielninjabear View Post

                  But I noticed that the the Face Index is coming up as "-1", on both approaches - interface or function library.
                  Originally posted by urielninjabear View Post

                  The 5th argument that's being omitted would be a FCollisionQueryParams with the flags above. The default version of this struct that's being used is initialized with those flags set to false.
                  Yep, that'll do it, I'd think.

                  As for doing this on standalone meshes, would it not make more sense to query the shooter about the gun and ammo type fired in the bullet impact scenario you mentioned, rather than how the wall responds to specific stimuli? If the brick wall is the same brick wall whether you shoot it with a watergun or an RPG-7, then in my mind, it seems reasonable to do the VFX/SFX handling in the context of the shooter/weapon/ammo, with consideration for the brick material of the wall.

                  There are other use cases, I'm sure. I'm just spitballing at this one, as it were.
                  @thereisnoscotty
                  Grand Marshal of the Parade of Madfellows

                  Comment


                    Originally posted by soctty View Post

                    I didn't mean to say it needed to be double-checked, just that I meant to say "height" where I said "FOV". I was agreeing with you, I just didn't communicate that very clearly. My bad.

                    The height of 500 was to ensure it'd be tall enough at the far extent to hit a roughly six foot tall humanoid's root position, assuming both are standing on the same plane at roughly the same elevation. I goofed and said nonsense instead.
                    You're all good, soctty. I didn't take any offense or anything. It was more "huh, yea, I've seen this before and this is what it normally is". Intent is hard to read over the internet.
                    Able Ability System - A high performance, robust ability system for UE4. Now Available!

                    Comment


                      Originally posted by soctty View Post


                      Yep, that'll do it, I'd think.

                      As for doing this on standalone meshes, would it not make more sense to query the shooter about the gun and ammo type fired in the bullet impact scenario you mentioned, rather than how the wall responds to specific stimuli? If the brick wall is the same brick wall whether you shoot it with a watergun or an RPG-7, then in my mind, it seems reasonable to do the VFX/SFX handling in the context of the shooter/weapon/ammo, with consideration for the brick material of the wall.

                      There are other use cases, I'm sure. I'm just spitballing at this one, as it were.

                      Yeah, absolutely! Maybe I explained poorly, but here's what I'm doing:

                      1. The weapon actor has an ability that ray traces for hits;
                      2. Once it hits something, whatever it is, it gets the Physical Material from it;
                      3. It then queries a DataTable, to get a struct from that PhysMat surface. It contains the SFX/VFX to be rendered on that impact.

                      Still, each actor, static mesh or skeletal mesh hit has its own Physical Material assigned which needs to be fetched on that weapon's hitscan, But it really seems that - at least OOTB - the Face or PhysMat really isn't available.

                      But generally speaking, yes, the weapon actor handles all the spawning and so. It just needs to know the Physical Material that it hit.

                      Comment


                        Thanks for the discussion on cone collision soctty and ExtraLifeMatt very informative.

                        Comment


                          Originally posted by ExtraLifeMatt View Post
                          UPDATE:

                          Real dumb bug with the Context re-use (it's not clearing out Targets from previous runs). Going to get a hotfix out with that change and the fixes for the known issues I mentioned above.

                          Able 3.51 submitted.



                          To work around the issues, you can disable Ability Context re-use in the Able settings, or just wait till this hotfix hits.
                          Hi, I had updated my project to 4.26, and I found a problem, PreviewAsset can't spawn, so I can't do preview, please fix it, thanks!

                          Another problem: It will crash, when I can call CancelAbility after event OnAbilityEndBP called
                          Last edited by MichaelLiew; 12-21-2020, 01:56 AM.

                          Comment


                            Originally posted by MichaelLiew View Post

                            Hi, I had updated my project to 4.26, and I found a problem, PreviewAsset can't spawn, so I can't do preview, please fix it, thanks!

                            Another problem: It will crash, when I can call CancelAbility after event OnAbilityEndBP called
                            Preview Asset definitely spawns. Open up the Able Ability Editor, go to the Settings tab on the far right, you'll see some fields called "Allowed Classes", make sure your preview asset is in that list and then you should see it in the drop down.

                            Check the Ability you are passing when you call CancelAbility. Or post the callstack of the crash and I can better help you diagnose what's going on.
                            Able Ability System - A high performance, robust ability system for UE4. Now Available!

                            Comment


                              Originally posted by ExtraLifeMatt View Post

                              Preview Asset definitely spawns. Open up the Able Ability Editor, go to the Settings tab on the far right, you'll see some fields called "Allowed Classes", make sure your preview asset is in that list and then you should see it in the drop down.

                              Check the Ability you are passing when you call CancelAbility. Or post the callstack of the crash and I can better help you diagnose what's going on.
                              No, Preview Asset definitely not spawn when using 4.26, The attachment is test project, run and press left mouse button it will crash. You can also find preview asset never spawn in this project, hoping your help.
                              Click image for larger version

Name:	Test.png
Views:	81
Size:	685.4 KB
ID:	1845556
                              Attached Files
                              Last edited by MichaelLiew; 12-21-2020, 09:26 PM.

                              Comment


                                I set the allowed classes to "Character" and was able to spawn the P actor fine. You may want to nuke your intermediate folder if you are still seeing issues, I was able to spawn it just fine but BP only projects can get in funky states.

                                As for the crash, that's because you are cancelling the Active Ability (i.e., the Ability you are currently running in the Editor) during the Ability End - so you end up nuking it mid update (which, arguably, I should prevent you from blowing your foot off like that - so I'll look at putting in some safety measures there). Basically, you should never tell an Ability to cancel itself during the Ability End - as it's already doing that.

                                EDIT: MichaelLiew (Tagging since I forgot to quote).
                                Attached Files
                                Last edited by ExtraLifeMatt; 12-22-2020, 11:16 AM.
                                Able Ability System - A high performance, robust ability system for UE4. Now Available!

                                Comment

                                Working...
                                X