Announcement

Collapse
No announcement yet.

Hidden Actor still gets picked up via Hit Result

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

    Hidden Actor still gets picked up via Hit Result

    So I've created a pickup for a mobile game. When the player taps the screen (or for me, clicks, in the 'New Editor Window') the pickup is hidden but if I click the spot again, I still get a hit result. I'd rather it not do that for my piece of mind. The pickup is only added to the inventory once, as it should. I only know it still registering because of the print string i put in.

    the pickup consists of just a mesh and its root. no collision or any other components.

    Is there a way to totally disable the actor? or will it even be a long term problem on mobile?

    #2
    hi! I need more info on how your blueprint is working cause if you look at the picture, I'm using SphereTrace to get hit result and detect actors. Basically you just need to add a list of actors to ignore, you can simply use get all actor of class to get all your actors and make an array to ignore them.

    Comment


      #3
      Inventory and item interaction in my project is server auth. So on pickup the servers adding to inventory, destroying the actor, and then updating the player. When the server destroys an actor it's auto replicated to all players.

      Giving the server authority also reduces cheating in a multiplayer set up.

      Comment


        #4
        Sorry, thought I posted this with my initial post. the code in the bottom comment runs first then runs whats on top.
        Attached Files

        Comment


          #5
          I appreciate the comments so far but they aren't quite what i'm looking for. This is a single player only title. and getting the objects is working, the problem is that it keeps working after it shouldn't. :P

          Comment


            #6
            You're tracing Visibility on Touch, set the static mesh's collision to Ignore Visibility after pickup. Similar to this:

            https://forums.unrealengine.com/deve...84#post1795184

            Comment


              #7
              Everynone coming to my rescue again! thanks mate. that did it.

              For others in the future, the new Set Collision Response to Channel node needs a primitive component for the target. I was able to get that from the Break Hit Result node, 'Hit Component' pin.

              Comment


                #8
                Another way of not having to deal with any of this would be to move the picked object out of the way, move it below the ground, inside of a mountain, anywhere players can't see / reach. The object can store its original location so you can move it back to 'respawn' it

                Comment


                  #9
                  I did consider that. I also look at this as a learning exercise. I like knowing why, or the way to fix the problem. I find that helps fix related problems that I run into down the line.

                  Comment


                    #10
                    I did consider that. I also look at this as a learning exercise.
                    Considering how trains were done in Fallout 3 (really fancy hats):

                    Click image for larger version

Name:	1352426162696699277.png
Views:	22
Size:	552.8 KB
ID:	1796246

                    I say there is no bad method for anything as long as it works fine

                    Good luck with the rest!

                    Comment

                    Working...
                    X