Announcement

Collapse
No announcement yet.

Able Ability System Info and Support Thread

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

    Hello, I'm trying to spawn actor from socket on a component. (muzzle of the gun my player is holding). I can't figure out how to do this. The Machine gun tutorial video uses raytraces from the camera position and the rocket launcher in the downloadable "CE1 Shooter" project uses a strange field labeled "ATT MAX" as the Source location.

    What is the proper way to do this?

    Also I would really appreciate a discord server for Able, it would be super helpful to be able to talk with other developers using the product with a more active use platform. Even if its something ExtraLifeMatt didn't frequent.

    Comment


      Originally posted by jhirsh View Post
      Hello, I'm trying to spawn actor from socket on a component. (muzzle of the gun my player is holding). I can't figure out how to do this. The Machine gun tutorial video uses raytraces from the camera position and the rocket launcher in the downloadable "CE1 Shooter" project uses a strange field labeled "ATT MAX" as the Source location.

      What is the proper way to do this?

      Also I would really appreciate a discord server for Able, it would be super helpful to be able to talk with other developers using the product with a more active use platform. Even if its something ExtraLifeMatt didn't frequent.
      Yea, just set that field to ClientAndServer. ATT_MAX is an invalid option that is due to the last update which needed to rename those fields for MacOS compilation.

      But, in regard to your question, you can override the Location field on the Spawn Actor task (hit the + button next to the transform) and you can simply get your SelfActor -> Cast it to your Character -> Get your Weapon -> Get the Socket Transform from your weapon and return that.

      There is a Discord server someone setup (it's in this thread), I know both myself and AngelV frequent the UnrealSlackers Discord from time to time.
      Able Ability System - A high performance, robust ability system for UE4. Now Available!

      Comment


        Originally posted by ExtraLifeMatt View Post
        But, in regard to your question, you can override the Location field on the Spawn Actor task (hit the + button next to the transform) and you can simply get your SelfActor -> Cast it to your Character -> Get your Weapon -> Get the Socket Transform from your weapon and return that.
        Thanks much for the response!
        So doing roughly what you are suggesting it seems to be ignoring the return values that I'm passing when spawning the actor.

        Click image for larger version

Name:	AbleBP.jpg
Views:	87
Size:	292.9 KB
ID:	1855888

        The prints are outputting the expected world location and rotations, but it is spawning the actor at a zero'd transform.

        Comment


          Originally posted by jhirsh View Post

          Thanks much for the response!
          So doing roughly what you are suggesting it seems to be ignoring the return values that I'm passing when spawning the actor.

          Click image for larger version

Name:	AbleBP.jpg
Views:	87
Size:	292.9 KB
ID:	1855888

          The prints are outputting the expected world location and rotations, but it is spawning the actor at a zero'd transform.
          That should be correct, you might want to turn on "Verbose" on the Spawn Actor task and check your logs. It should print out the exact transform it's receiving from BPs.
          Able Ability System - A high performance, robust ability system for UE4. Now Available!

          Comment


            Originally posted by ExtraLifeMatt View Post

            That should be correct, you might want to turn on "Verbose" on the Spawn Actor task and check your logs. It should print out the exact transform it's receiving from BPs.
            Sorry should have included that in my original message. The log is essentially showing it spawns at whatever values are in the editor fields for offset&rotation. The two printlines are the values I'm returning in the struct.

            Click image for larger version

Name:	log.jpg
Views:	91
Size:	137.7 KB
ID:	1855939

            Comment


              Originally posted by jhirsh View Post

              Sorry should have included that in my original message. The log is essentially showing it spawns at whatever values are in the editor fields for offset&rotation. The two printlines are the values I'm returning in the struct.

              Click image for larger version

Name:	log.jpg
Views:	91
Size:	137.7 KB
ID:	1855939
              ARGGHHH, I see the problem. That field isn't hooked up internally. I'll get a bug fix submitted.
              Able Ability System - A high performance, robust ability system for UE4. Now Available!

              Comment


                Originally posted by ExtraLifeMatt View Post

                ARGGHHH, I see the problem. That field isn't hooked up internally. I'll get a bug fix submitted.
                Awesome glad to know I'm not just being a moron. If it's a small change would you mind letting me know what the code change is so I can make the adjustment locally?

                Comment


                  Originally posted by jhirsh View Post

                  Awesome glad to know I'm not just being a moron. If it's a small change would you mind letting me know what the code change is so I can make the adjustment locally?
                  Sure, it's a trivial code change. Just add the following line to ablSpawnActorTask.cpp:

                  Code:
                  void UAblSpawnActorTask::BindDynamicDelegates(UAblAbility* Ability)
                  {
                     Super::BindDynamicDelegates(Ability);
                  
                     ABL_BIND_DYNAMIC_PROPERTY(Ability, m_ActorClass, TEXT("Actor Class"));
                     ABL_BIND_DYNAMIC_PROPERTY(Ability, m_AmountToSpawn, TEXT("Amount to Spawn"));
                     ABL_BIND_DYNAMIC_PROPERTY(Ability, m_Location, TEXT("Location"));
                  }
                  Able Ability System - A high performance, robust ability system for UE4. Now Available!

                  Comment


                    Originally posted by ExtraLifeMatt View Post

                    Sure, it's a trivial code change. Just add the following line to ablSpawnActorTask.cpp:

                    Code:
                    void UAblSpawnActorTask::BindDynamicDelegates(UAblAbility* Ability)
                    {
                    Super::BindDynamicDelegates(Ability);
                    
                    ABL_BIND_DYNAMIC_PROPERTY(Ability, m_ActorClass, TEXT("Actor Class"));
                    ABL_BIND_DYNAMIC_PROPERTY(Ability, m_AmountToSpawn, TEXT("Amount to Spawn"));
                    ABL_BIND_DYNAMIC_PROPERTY(Ability, m_Location, TEXT("Location"));
                    }
                    Awesome thanks much, just got around to looking at this. Im not seeing a member variable m_location. I do see m_SpawnLocation though. Just in case someone else runs into this in the future.

                    Comment


                      Sorry you are probably sick of me by now. I have been wrestling with this for a couple of days and I just can't figure out the source of my issue here.


                      Some background on my setup:
                      Using MoveIt plugin for character movement. *this may or may not have bearing on my issue
                      This is a first person project so my character has a separate 3rd person model and 1st person.
                      The camera is tied to this first person view model.
                      I am currently manually synching the camera pitch via SetWorldRotation in replicated events based on player input in blueprint.
                      This is using PIE Listen server with 2 players.

                      What I am seeing:
                      When I use an ability that uses the Camera as source for a raycast or spawn actor the raycast & spawn ent both work as expected. However the client will see the raycast and spawned entity but at the default pitch of the camera rather than the updated angles.
                      The camera & viewarm pitch appear to update for the client and server as expected.

                      What I have done:
                      I have ensured that neither of my raycast or spawn entity have an overridden Binding on location.
                      Realm is set to Client And Server
                      I have created multiple abilities to ensure it wasn't some kind of data corruption
                      Tried a couple half cocked work arounds like making my 1st person gun an actor with an able component. Couldn't figure out how to link an actor to an actor efficiently, but may go back to this method to see if i have better luck.


                      I don't know much about network replication in Unreal so I'm struggling to find a good way to debug the actual source of this issue. If you have any pointers here I would greatly appreciate it.




                      Thanks much,

                      Jordan

                      Comment


                        Originally posted by jhirsh View Post
                        Sorry you are probably sick of me by now. I have been wrestling with this for a couple of days and I just can't figure out the source of my issue here.


                        Some background on my setup:
                        Using MoveIt plugin for character movement. *this may or may not have bearing on my issue
                        This is a first person project so my character has a separate 3rd person model and 1st person.
                        The camera is tied to this first person view model.
                        I am currently manually synching the camera pitch via SetWorldRotation in replicated events based on player input in blueprint.
                        This is using PIE Listen server with 2 players.

                        What I am seeing:
                        When I use an ability that uses the Camera as source for a raycast or spawn actor the raycast & spawn ent both work as expected. However the client will see the raycast and spawned entity but at the default pitch of the camera rather than the updated angles.
                        The camera & viewarm pitch appear to update for the client and server as expected.

                        What I have done:
                        I have ensured that neither of my raycast or spawn entity have an overridden Binding on location.
                        Realm is set to Client And Server
                        I have created multiple abilities to ensure it wasn't some kind of data corruption
                        Tried a couple half cocked work arounds like making my 1st person gun an actor with an able component. Couldn't figure out how to link an actor to an actor efficiently, but may go back to this method to see if i have better luck.


                        I don't know much about network replication in Unreal so I'm struggling to find a good way to debug the actual source of this issue. If you have any pointers here I would greatly appreciate it.




                        Thanks much,

                        Jordan
                        You may need to make sure your Player Controller is sync'ing pitch. The Camera Target Type uses the following code (you can place a breakpoint in ablAbilityTypes.cpp if you want to step through things):

                        Code:
                        if (m_Source == EAblAbilityTargetType::ATT_Camera && !TargetActor->IsA<ACameraActor>())
                        {
                           FVector ActorEyes;
                           FRotator ActorEyesRot;
                           TargetActor->GetActorEyesViewPoint(ActorEyes, ActorEyesRot);
                           OutTransform = FTransform(FQuat(ActorEyesRot), ActorEyes);
                        }
                        So likely GetActorEyesViewPoint (which uses the controller pitch/rotation IIRC) isn't returning what you expect.
                        Able Ability System - A high performance, robust ability system for UE4. Now Available!

                        Comment


                          Yeah, pretty sure
                          Originally posted by ExtraLifeMatt View Post

                          You may need to make sure your Player Controller is sync'ing pitch. The Camera Target Type uses the following code (you can place a breakpoint in ablAbilityTypes.cpp if you want to step through things):

                          Code:
                          if (m_Source == EAblAbilityTargetType::ATT_Camera && !TargetActor->IsA<ACameraActor>())
                          {
                          FVector ActorEyes;
                          FRotator ActorEyesRot;
                          TargetActor->GetActorEyesViewPoint(ActorEyes, ActorEyesRot);
                          OutTransform = FTransform(FQuat(ActorEyesRot), ActorEyes);
                          }
                          So likely GetActorEyesViewPoint (which uses the controller pitch/rotation IIRC) isn't returning what you expect.
                          Thank you much. That is the case, now to figure out why its not replicating...

                          Comment


                            Able 3.53 submitted. Notes below!

                            Able v3.53
                            - Fixed an issue where Channeling active tasks/Abilities may not get their OnAbility/TaskEnd called once the channel failed. This did not affect Passive abilities.

                            - Fixed an issue where the Location Transform on the Spawn Actor task wasn't hooked up properly internally (so it always used the data value rather than runtime value).
                            Another quick note: I've gotten the "We want a Discord!" a ton lately, so I'm going to look at setting that up this weekend. Once I do, I'll add the link to the OP here and on the store page.
                            Last edited by ExtraLifeMatt; 01-28-2021, 09:34 PM.
                            Able Ability System - A high performance, robust ability system for UE4. Now Available!

                            Comment


                              Originally posted by ExtraLifeMatt View Post
                              Able 3.53 submitted. Notes below!



                              Another quick note: I've gotten the "We want a Discord!" a ton lately, so I'm going to look at setting that up this weekend. Once I do, I'll add the link to the OP here and on the store page.
                              Did that solve the channeling active issue I was having?

                              Comment


                                Hey Matt and Friends. While wrestling with getting Able working properly on a FPS project, I decided to get the community shooter project up and running to see if it could solve any of my problems. (there was a bunch of weird data field settings that needed adjustment and the OnRayCastEvent function needed to be deleted and *re-added no clue why).
                                Once resolved I tested and the community shooter project and it also doesn't properly handle player pitch.

                                The simulation will properly take into account your yaw, but not pitch. I have been banging my head against the right way to solve this. I would love to use the controller rotation pitch values, but enabling player control rotation pitch also pitches the root component (collision capsule). Would love to talk this through with someone and hopefully I'm just missing something obvious.

                                Comment

                                Working...
                                X