Announcement

Collapse
No announcement yet.

how to know if an actor it's inside a volume.

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

    how to know if an actor it's inside a volume.

    Im talking about a volume, i can extend it, it works but i wanna know if an actor it's inside of it any idea ?
    Last edited by Neongho; 01-09-2018, 02:29 PM.
    Some cool unreal projects you may like!


    Developer of GOTA - Survivalism Gladiatorial game Buy the game google gladiators of the arena steam https://store.steampowered.com/app/7..._Of_The_Arena/

    Download the demo Download the demo
    external link Dropbox DropBox

    Become a c++ Professional now C++ Networking Tutorial

    #2
    I haven't tested it, but wouldn't this work:

    Code:
    ForEach TouchingActors(class'Actor', A)
    Last edited by Coldscooter; 01-11-2018, 04:44 PM.

    Comment


      #3

      We used this to find out if your in a volume at the start. We used this in RestartPlayer function.
      Code:
      local PBIndoorWeatherVolume IWV;
      local bool InWeatherVolume;
      local Actor WeatherStartingSpot;
      local NavigationPoint StartSpot;
      
      StartSpot = LastStartSpot;
      WeatherStartingSpot = StartSpot;
      
      foreach AllActors(Class'PBIndoorWeatherVolume', IWV)
      {
        InWeatherVolume = IWV.Encompasses(WeatherStartingSpot);
      
        if(InWeatherVolume)
          break;
      }
      
      if(!InWeatherVolume)  
       {   
        //if not in volume do what ever
       }   
       else
       {  
         //in volume do whatever
       }
      Last edited by gamepainters; 01-12-2018, 08:29 PM.

      Comment


        #4
        I know this is a super old thread, but I also just needed to do this too.

        If you have lot of physical volumes, rather than checking through every one, you can do a simple small trace from your actor to check if it hits a physical volume:
        Code:
        trace(hitLoc, hitNorm, end, start, false,,, TRACEFLAG_PhysicsVolumes);

        Comment


          #5
          That is another option ! thanks
          Some cool unreal projects you may like!


          Developer of GOTA - Survivalism Gladiatorial game Buy the game google gladiators of the arena steam https://store.steampowered.com/app/7..._Of_The_Arena/

          Download the demo Download the demo
          external link Dropbox DropBox

          Become a c++ Professional now C++ Networking Tutorial

          Comment


            #6
            Hello Neongho

            Here comes the noob and stupid solution for kismet

            I would just add a trigger volume in almost the same size and position of the volume which you want to detect that the player is inside, and just would use the kismet condition for this trigger volume "Touched" (if this trigger volume is touched by the player or any pawn, that means this actor is inside the forementioned volume).

            Cheers!
            https://sites.google.com/view/udkultimate/

            Comment


              #7
              I don't trust so much triggers I have bad experiences with em but thanks!

              Best is an actor with a cylinder collision component instead of a trigger and use the touch function.
              Some cool unreal projects you may like!


              Developer of GOTA - Survivalism Gladiatorial game Buy the game google gladiators of the arena steam https://store.steampowered.com/app/7..._Of_The_Arena/

              Download the demo Download the demo
              external link Dropbox DropBox

              Become a c++ Professional now C++ Networking Tutorial

              Comment


                #8
                Originally posted by Coldscooter View Post
                I know this is a super old thread, but I also just needed to do this too.

                If you have lot of physical volumes, rather than checking through every one, you can do a simple small trace from your actor to check if it hits a physical volume:
                Code:
                trace(hitLoc, hitNorm, end, start, false,,, TRACEFLAG_PhysicsVolumes);
                Thanks for this, nice to see that.

                @NIDAL NIJM GAMES If I remember right, touch only happens when you break the plain of the trigger( the wall of it ). If I remember right when you spawn in it, it does not recognize that.

                Comment

                Working...
                X