Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Open the door always away from player

Hello, im looking for solution to open the door always awas from player. At the moment my door is working with one Box Collision. Press 'F' the door is open - alway into one way.

As far as I know, I have to use two boxes, one on each side.

My question is, how to get the player position, in witch box he is, or maybe there are an other, easier, solution how to do this.

Thank you!

Product Version: UE 4.18
more ▼

asked Dec 04 '17 at 11:56 AM in Blueprint Scripting

avatar image

3 1 2

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

You could get the "UnitDirectionVector" from door to player and calculate its dot product with the door's forward vector. If it is negative, the player is behind the door, if it is positive, the player is in front of it.

Then it is a matter of picking the correct animation for each case.

This, of course, assumes the door actor is "facing" the door itself - if not, you could always just place an "arrow" actor inside it facing the proper way, I guess.

more ▼

answered Dec 04 '17 at 12:38 PM

avatar image

185 5 8 14

avatar image SirDraug Dec 08 '17 at 05:55 PM

Thank you, I got it with two boxes, and check in what box my character is. Its working, kinda buggy but its ok atm.


(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question