Announcement

Collapse
No announcement yet.

Top Down Stealth Toolkit

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

    #91
    Hi, I've submitted the v3.3 update to the Marketplace. As shown in the previous video (https://www.youtube.com/watch?v=VAlAMrBbIDo), it adds a secondary player control system where the player character always looks at the mouse cursor while walking. I've added some basic interpolation to make sure that the character doesn't immediately look at the cursor location, but instead eases into the new rotation over time. Also sprinting cancels the aiming and the character will always face the direction of the sprint.

    You can switch between the new control system and the old one by heading over to the "BP_GameMode_CoreGame" blueprint, and then setting the "Default Pawn Class" to BP_PlayerCharacter_Mouse+KeyboardControl or BP_PlayerCharacter_KeyboardControl.

    Click image for larger version  Name:	defpawn.jpg Views:	0 Size:	417.7 KB ID:	1725074

    Edit: The update has gone live on the Marketplace. You can identify all the new changes by searching for the Version3_3 Boolean variable in blueprints.
    Last edited by Stormrage256; 02-25-2020, 01:40 AM.
    Unreal Possibilities
    Wave Spawning System | Tower Defense Starter Kit | Grid Creation Systems

    Comment


      #92
      Can't open the project ,when update to 2.43.3! Expect auther fix it! Thank'u!

      Comment


        #93
        Originally posted by sea75 View Post
        Can't open the project ,when update to 2.43.3! Expect auther fix it! Thank'u!
        Hi, that is most certainly a result of Unreal Engine waiting for the shaders to be compiled for the first time. Just keep it running for a while and the project should open once its done. You can find more details about it here: https://forums.unrealengine.com/deve...04#post1418504
        Unreal Possibilities
        Wave Spawning System | Tower Defense Starter Kit | Grid Creation Systems

        Comment


          #94
          Thank'u,I get.

          Comment


            #95
            Is there way to decrees visual detection chase or disable response to visual perception? For example for equipping some sort of camouflage.

            Comment


              #96
              Hi Norhaji , it's not supported by default. On paper, it's quite easy to make the player character invisible to the AI by not registering the player as a Target Stimulus. When you do that, the AI cannot will not search for the said Stimulus. For example, in the case of your player character, it can be achieved through the following logic:

              Click image for larger version

Name:	cloaktest1.jpg
Views:	119
Size:	330.3 KB
ID:	1745011

              As you can see below, the Patrol Guard can no longer see the player character as long as its turned off.

              Click image for larger version

Name:	cloakedproto.jpg
Views:	102
Size:	245.4 KB
ID:	1745012

              However, doing so will break some other systems when the AI accidentally walks over to where the player is standing. With the visual perception unable to see the player when cloaked, even if the motion perception (used when you enter the small circular ring around an AI guard) can know that there is something close by, it will not be able to do anything without actually seeing the player using visual perception. I'll look into it and let you know what can be done about it.
              Unreal Possibilities
              Wave Spawning System | Tower Defense Starter Kit | Grid Creation Systems

              Comment


                #97
                Originally posted by Stormrage256 View Post
                Hi Norhaji , it's not supported by default.
                 
                Spoiler
                Thanks for replay. It would be nice if motion perception on invisible target would trigger working state on guards.

                Comment


                  #98
                  Originally posted by Norhaji View Post

                  Thanks for replay. It would be nice if motion perception on invisible target would trigger working state on guards.
                  Alright, so I was going over the implementation and was wondering what you had in mind regarding the design behind detection of invisible targets by enemy AI. Do you want them to 'see' the invisible player only when in close range (within the circle)? Or is it like once the motion perception detects the player within the circle, it can temporarily keep seeing even if the player goes outside range (basically the cloak cancelling out upon detection)?
                  Unreal Possibilities
                  Wave Spawning System | Tower Defense Starter Kit | Grid Creation Systems

                  Comment


                    #99
                    Originally posted by Stormrage256 View Post

                    Alright, so I was going over the implementation and was wondering what you had in mind regarding the design behind detection of invisible targets by enemy AI. Do you want them to 'see' the invisible player only when in close range (within the circle)? Or is it like once the motion perception detects the player within the circle, it can temporarily keep seeing even if the player goes outside range (basically the cloak cancelling out upon detection)?
                    Right now I need stealth device. So disabling perception kinda works. As for system modification I see it that way.

                    Lets add additional parameter to visibility sense generator, np. 0-100% and divide line of sight to zones. If 100% entering line of sight equals instant detection. Lower value is, shorter instant detection range becomes with some chance to trigger investigation when target is outside instant detection zone.
                    If visibility would be 0% entering motion perception zone should trigger investigation with ability to detect and break stealth for X time after looking directly at target in motion perception range.

                    Something like this.

                    Comment


                      Originally posted by Norhaji View Post

                      Right now I need stealth device. So disabling perception kinda works. As for system modification I see it that way.

                      Lets add additional parameter to visibility sense generator, np. 0-100% and divide line of sight to zones. If 100% entering line of sight equals instant detection. Lower value is, shorter instant detection range becomes with some chance to trigger investigation when target is outside instant detection zone.
                      If visibility would be 0% entering motion perception zone should trigger investigation with ability to detect and break stealth for X time after looking directly at target in motion perception range.

                      Something like this.
                      Alright, got it. Dividing Line of Sight into zones is definitely something that I'm planning to look into for future updates, kind of along the lines of Shadow Tactics. But since it will involve making changes to the core design (from instant detection to a delayed detection), it's going to be a while before the feature makes it into the toolkit.

                      As for the cloaking system, breaking stealth seems like a feasible idea. For example, if the motion perception detects something that is right in front of it, we can have a different response when compared to how it behaves when the stimulus is behind it. And since the AI can already interact with stimuli (like reactivating stunned guards), the same workflow could be used here to interact with the cloaked actor, thus causing it to break stealth. Once that happens, the Visual Perception can kick in and do its job as usual. I'll try it out and let you know how it goes.
                      Unreal Possibilities
                      Wave Spawning System | Tower Defense Starter Kit | Grid Creation Systems

                      Comment


                        Hey Norhaji , I found a much easier solution than the above approach to have the enemy AI detect cloaked targets in close range. No need to get the Motion Perception involved at all, but instead use a sort of multi-stage Visual Perception model. Will have to do a few more tests, but if everything checks out, I'll share a tutorial showing how you can implement it in your game.
                        Unreal Possibilities
                        Wave Spawning System | Tower Defense Starter Kit | Grid Creation Systems

                        Comment


                          Originally posted by Norhaji View Post
                          Is there way to decrees visual detection chase or disable response to visual perception? For example for equipping some sort of camouflage.
                          Hey, you can create a cloaking system for your game by adding the following logic:

                          1. Create a new Blueprint Interface. Let's call it BPI_Cloaking and we'll add two functions to it:
                          • OnDisarmCloak (No input/output parameters)
                          • IsCloaked? (No input parameter; One boolean output parameter)

                            Click image for larger version  Name:	CloakInt.jpg Views:	0 Size:	290.5 KB ID:	1749350
                          2. Open your Player Character blueprint add a new Boolean variable bCloaked to the blueprint. This variable will help us determine at any point if the player is cloaked or not.

                          3. Now have your Player Character blueprint implement the BPI_Cloaking interface and it's interface functions as shown below:

                          Click image for larger version  Name:	disarmcloak.jpg Views:	0 Size:	328.2 KB ID:	1749351

                          Click image for larger version  Name:	iscloaked.jpg Views:	0 Size:	326.0 KB ID:	1749352

                          4. With the interface taken care of, all that's left in the Player Character is to add the input event for turning on/off cloaking.

                          Click image for larger version  Name:	cloakinput.jpg Views:	0 Size:	328.7 KB ID:	1749353
                          Here, you can add additional logic to handle setting of cloaking material and so on.

                          5. Now we move on to the AI side of the implementation. We'll start with adding a couple of new parameters to the struct Struct_VisualPerceptionData:
                          • bCanDetectCloakedObjects? (Boolean)
                          • CloakDetectionRadius (Float)
                          The bCanDetectCloakedObjects? parameter can be used to have only certain AI agents be capable of short range cloak detection. For example, you can have the Patrol Guards have this feature and turn if off for Cameras.

                          6. Head over to the BPC_AIPerception blueprint and open the VisualPerceptionCheck function. We'll add the following logic as part of the Linear Distance check to ensure that the perception evaluates against different vision radii between normal and cloaked targets.

                          Click image for larger version

Name:	vispercnew.jpg
Views:	81
Size:	416.3 KB
ID:	1749360
                          Basically the normal targets will be perceived at the default Vision Range where as Cloaked targets can be perceived only at the Cloak Detection Range.

                          7. Now select the AIPerception component within your BP_PatrolGuard_Parent blueprint, then set the bCanDetectCloakedObjects? to True, and CloakDetectionRadius to some value less than VisionRadius.

                          Click image for larger version  Name:	patrolcloakdet.jpg Views:	0 Size:	440.5 KB ID:	1749355

                          8. Finally we can make sure that when a cloaked target is detected, that it's cloak gets disarmed. If not, as soon as the player gets out of the small cloak detection range, the AI will be unable to see the player. So fire up the BP_AISensoryManager blueprint, open the EvaluateTargetsForAgent function, and call the OnDisarmCloak interface function (created in step 1) before setting a new Active Target.

                          Click image for larger version  Name:	aismdisarm.jpg Views:	0 Size:	404.5 KB ID:	1749356

                          And I believe that's all there is to it. Let me know if you have any doubts regarding the workflow.
                          Last edited by Stormrage256; 04-23-2020, 04:23 AM.
                          Unreal Possibilities
                          Wave Spawning System | Tower Defense Starter Kit | Grid Creation Systems

                          Comment


                            Hi Stormrage256,

                            I was thinking in buying this toolkit, but since I'm new in Unreal I want to see if there are tutorials on how to use it. I see in the first page some tutorials in our site but it seems the site doesn't exist...

                            Regards,
                            Joao Henriques

                            Comment


                              Originally posted by JMHenriques View Post
                              Hi Stormrage256,

                              I was thinking in buying this toolkit, but since I'm new in Unreal I want to see if there are tutorials on how to use it. I see in the first page some tutorials in our site but it seems the site doesn't exist...

                              Regards,
                              Joao Henriques
                              Hi Joao, thanks for bringing that to my attention. My blog domain had recently been changed from .in to .com, which caused all external references to become broken. All of the links have been corrected and you should now be able to go through all of the articles. If you're having any further doubts or run into trouble understanding some concept that is not listed here, you can always reach me here or through the support mail id.

                              - Rohit
                              Unreal Possibilities
                              Wave Spawning System | Tower Defense Starter Kit | Grid Creation Systems

                              Comment


                                Thinking of buying.

                                there is absolutely nothing preventing us from switching camera position to FPS or third person correct?

                                i see you've spoken about keyboards and mouses, nothing stopping us from mapping movement to a game pad?

                                I've been wondering about the vision cones, I'd like to turn them off, but I'm also wondering if they're able to spot in relation to height. If a vision cone runs into a waist high block with the character on the other side-- does the vision cone stop them from seeing the player clearly standing there? If the AI were on a 2nd story would their vision cone(if large enough) be able to spot the player on first level?
                                Last edited by dresyn2k8; 07-31-2020, 11:39 PM.

                                Comment

                                Working...
                                X