x

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"

About collision box for interaction with object.

Hi.

I am trying to make a smart system with my interaction box trigger but I am pretty much falling at every turn ://

I'm trying to set a collision box for a door or something you can interact with that displays a interaction button to be press to open the actual door or interact with something. I got it working at 70% so the msg shows and the interaction works but I can interact within the collision box even when not face the object(bump:(:(:( ). So I alrdy have a line trace set up for my items interaction but i was wondering if there was another way (then line trace ) to manage where my actor is facing so that once im in the trigger box collision the interaction text only shows when facing the object like the door or something suspicious.

Product Version: UE 4.9
Tags:
more ▼

asked Sep 30 '15 at 05:24 PM in Blueprint Scripting

avatar image

Deathscyp
43 8 7 9

avatar image ambhar Sep 30 '15 at 06:30 PM

You should use "Line Trace By Channel" on your character. And whenever it will see the trigger, it will open door.

avatar image Deathscyp Sep 30 '15 at 09:51 PM

I did the line trace by channel but the problem i get is that when exiting the box collision well the text doesnt dissapear because of the line trace. it only works if i dont face the door or object.

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

2 answers: sort voted first

Alright

Seems like i manage to make it work with trial and error. I went to the source of the line trace in my_character BP and put a branch when the line trace would be sent so if it doesn't find a target (my collision box) then it's gonna reset my created message to nothing so it erases it. Basically I deleted the outer collision i created and kept the one that was surrounding the door mesh so the line trace as something to hit. And voila. now i need to face the object for the msg to show and when i lose sight. The message reset to none so goes away.

If anyone tumbles on that problem I hope I gave you guys a quick easy solver. Sorry Nsomnia my knowledge of all that you where proposing is not wide enough. How ever if you ever can show me a simplify version of what i just did I'd be more then happy to try that instead.

Cheers

more ▼

answered Oct 01 '15 at 03:32 PM

avatar image

Deathscyp
43 8 7 9

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

When creating the interaction widget why not have it trace before hand say 60 times 1degree each just make a forloop from 0 to 59 index and the line trace would be typical but the ending position would be rotated 1 degree each time,

I dont have an editor open right now but playing around with the idea of only creating the widget if the trace can hit the object that will be interacted with within a certain angle. Traces are very cheap.

You could also play with forward vectors right vector applied to rotators or how about a simple get actor world rotation.

Your character for example is always going to be rotated 0 to 180 and -179 to 0 so you can do a check before creating the widget if the angle if within a certain range. I think theres even a rotation range or angle range node.

Hope this helps Don't forget to accept an answer that best clears your question up or answers it so when the community finds your question in the future via search/google they know exactly what you did to fix it/get it going.

more ▼

answered Sep 30 '15 at 08:53 PM

avatar image

Nsomnia
1.8k 67 25 137

avatar image Deathscyp Sep 30 '15 at 09:50 PM

Hey nsomnia.

Could you simplify a bit what you are saying plz. Where would you be putting the Check rotation. Id like to use the get actor wolrd rotation. The widget is my character UI so its always on in the background till you enter a collision that creates the text for the interaction. I want the text to be on only if character is within range and facing the object.

(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