Announcement

Collapse
No announcement yet.

Opening a door when the player's cursor is over the object, as well as being inside a collision box

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

    #16
    Would a line trace be a viable alternative? Whenever the player tries to activate the door just do a trace in the direction the player is facing and see if you hit the door?

    Comment


      #17
      Originally posted by Gbr View Post
      Well, looking at this part of the code I can't figure out why you are facing this issue. This BP you post is your Character's BP?
      This was created inside my locker's BP, to make it quicker and easier when creating multiple locker objects.

      Originally posted by Variss View Post
      Would a line trace be a viable alternative? Whenever the player tries to activate the door just do a trace in the direction the player is facing and see if you hit the door?
      I've not done anything with line tracing yet, but from what I've seen, that could be a better way to handle all of this if a solution doesn't get presented soon.

      Comment


        #18
        Line tracing is probably your best option. A line tracing function that executes on activate with a blueprint interface to communicate with your door bp. For you door I would have a gate that only executes the door anim on overlap. The line trace will always happen on your activate but won't do anything unless the player is inside the trigger volume.
        Modular House Interior Pack

        Medieval Dinnerware Pack

        Comment


          #19
          Is anyone willing to show a quick example of this? I am currently working on the same thing as it seems really stupid to just have overlap events open doors. I shouldn't be able to open a door behind me when clearly both my hands are facing forward away from the door holding a gun. Not very accurate imo lol.

          Comment

          Working...
          X